2009/4/5 =F7=C1=CC=C5=D2=C9=CA =ED=D9=D4=C9=CE=D3=CB=C9=CA <valeri.mytinski= @gmail.com>: > > > 05.04.2009, =3DD7 9:00, Graham Chiu =3DCE=3DC1=3DD0=3DC9=3DD3=3DC1=3DCC(= =3DC1): > >> >> append [ ] 3 >> returns the value [ 3 ] >> >> this value is a block containing the single element 3, and it then >> becomes the parameter for the next 'append >> > Yes, I see what is happening. I read code: > > loop 2 [append [] 3] > > as "do 2 times block of code [append [] 3]". Apparently this is not =3D20 > right. > Could you please suggest some rule for reading? >
The first time 3 is appended to the empty block. The second time 3 is appended to the now non empty block which contains 3 you end up with [ 3 3 ] If you wish to create a new empty block each time, you would do this instea= d loop 2 [ append copy [] 3 ] which would be the same as append [ ] 3 append [ ] 3 --=20 Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR. -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
