Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[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. --Ryan [Sanghabum--aol--com] wrote:
> 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 > > --Thanks, > --Colin > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400