>>See? I guess you have to use 'copy to be sure.

Thanks, Rachid, but the original idea was to have duplicate pointers to the same 
block. Copying would defeat that purpose.

Coincident with the empty thread, consider this:

>> list1: [1 2]
== [1 2]
>> list2: next list1
== [2]
>> empty? list2
== false
>> clear list1
==[]
>> empty? list1
== true
>> empty? list2
** Script Error: Out of range or past end.
** Where: empty? list2

Again, REBOL allows us duplicate pointers but does not synchronize them properly when 
one pointer clears the list.


*********** REPLY SEPARATOR  ***********

On 12/11/1999 at 6:52 AM [EMAIL PROTECTED] wrote:

Hello Ted,

> Here's something else that I find confusing:
>
> >> list: [ 1 2 3 4 ]
> == [ 1 2 3 4 ]
> >> list2: next list
> == [ 2 3 4 ]
> >> clear list
> == []
> >> list2:
> == [ 2 3 4 ]
> >> next list2:
> ** Script Error: Out of Range or Past End
>
> About every other operation I try with list2 errors. Exceptions
> are that I can assign it to another variable and print it.

Suddenly I remembered, list2 is nothing more than the location of 'next
list, so the printing thing I can't explain, but take a look at this:

>> pnt1: [1 2 3 4 5]
== [1 2 3 4 5]
>> pnt2: next pnt1
== [2 3 4 5]
>> replace pnt1 4 6
== [1 2 3 6 5]
>> print pnt2
2 3 6 5

See? I guess you have to use 'copy to be sure.

Regards,
Rachid



Reply via email to