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

[REBOL] Block Creation Re:

From: anton_rolls:melbourne at: 19-Oct-2000 17:31

Hi, block1: [] Each time around, block1 is pointed at a growing block, starting out initially as []. The block is modified to include "text1" each time round. Remember, the thing that is actually modified is the []!!! To see this, try this one-liner: do a: does [loop 3 [blk: [] insert blk 'gold source a]] You should notice that the thing that blk is pointing to is actually growing in the source. block2: to-block "" This code gets evaluated each time, which means that the thing that block2 used to point to (["text2"]) is forgotten in favour of the newly created []. Regards, Anton.