[REBOL] Re: If without a THEN
From: ryanc:iesco-dms at: 9-Aug-2001 12:30
Your answer is that 'remove returns a block, so 'if gets the argument type it
needs. No reason for error. The contents of the block at the position
returned by remove are simply evaluated, in this case to effect other than
returning the last value in the block, 12.
> Hi all,
> Just purely out of curiosity, can anyone tell me why this badly-bracketed
> code does anything other than give a message "Script Error: if expected
> then-block argument of type: block"?
> myblock: [1 2 3 4 5 6 7 8 9 10 11 12]
> foreach xx myblock [
> if xx = 9
> remove find myblock xx
> ] ; for
> print myblock
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.