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

[REBOL] Re: setting values to blocks - need help

From: christian:ensel:gmx at: 28-Apr-2009 11:19

Hi Carlos, Tim already gave you the exact reasoning for what you're experiencing here, you can examine it for yourself:
>> loop 2 [append/only same: [] []]
== [[] []] Not only are these blocks equal:
>> equal? same/1 same/2
== true They are the same blocks, indeed:
>> same? same/1 same/2
== true That's why
>> append first same 1 same
== [[1] [1]] Whereas with fresh copies of the empty block
>> loop 2 [append/only equal: [] copy []]
== [[] []]
>> equal? equal/1 equal/2
== true
>> same? equal/1 equal/2
== false
>> append first equal 1 equal
== [[1] []] Cheers, Christian Tim Johnson schrieb: