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

[REBOL] copy versus copy/deep Re:

From: joel:neely:fedex at: 28-Aug-2000 11:32

See what happens, after executing the code from your example, if you modify a nested sub-block of a. That's the difference.
>> append a/3/2 99
== [4 5 99]
>> a
== [1 2 [3 [4 5 99] 6] 7 8]
>> b
== [1 2 [3 [4 5 99] 6] 7 8]
>> c
== [1 2 [3 [4 5] 6] 7 8]
>>
-jn- [princepawn--lycos--com] wrote:
> As my example below shows, there does not appear to a difference in handling nested blocks between copy and copy/deep > > >> a: [ 1 2 [ 3 [ 4 5 ] 6 ] 7 8 ] > == [1 2 [3 [4 5] 6] 7 8] > >> b: copy a > == [1 2 [3 [4 5] 6] 7 8] > >> b > == [1 2 [3 [4 5] 6] 7 8] > >> c: copy/deep a > == [1 2 [3 [4 5] 6] 7 8] > >> c > == [1 2 [3 [4 5] 6] 7 8] > >> b > == [1 2 [3 [4 5] 6] 7 8] > >> a > == [1 2 [3 [4 5] 6] 7 8] > >> > > Get your FREE Email and Voicemail at Lycos Communications at > http://comm.lycos.com
-- ; Joel Neely [joel--neely--fedex--com] 901-263-4460 38017/HKA/9677 REBOL [] print to-string debase/64 decompress #{ 789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC B6F4F574CFC888342AC949CE74B50500E1710C0C24000000}