[REBOL] Re: Accessing nested Blocks + search in blocks
From: jthomas:apollo:evo:it at: 4-Nov-2000 19:19
On 03-Nov-00, Andrew Martin wrote:
>AM Joachim Thomas wrote:
>AM> having this
>AM> myblock: [[one [1 2 3]][two [4 5 6]][three [7 8 9]]]
>AM> I can extract a value and put it in
>AM> myvalue: myblock/1/2/3
>AM> but if I change myvalue: the result is only local, not global to
>AM> is there a way to assign the content of myblock, like a pointer, to
>AM>> myblock: [[one [1 2 3]][two [4 5 6]][three [7 8 9]]]
>AM == [[one [1 2 3]] [two [4 5 6]] [three [7 8 9]]]
>AM>> myvalue: myblock/1/2/3
>AM == 3
>AM>> print myvalue
>AM>> myblock/1/2/3: "I'm a new value!"
>AM == [1 2 "I'm a new value!"]
>AM == [[one [1 2 "I'm a new value!"]] [two [4 5 6]] [three [7 8 9]]]
yes, I know this... :-)
my question was if I can assign myblock/1/2/3 to a variable in some way
and use this variable to access and/or modify the element in myblock...
By the way, is there a method to search (deep/recutsively) into block, not only at the
first level? And accessing into blocks, like myblock/1/2/3 using
indexes/variables and not direct references?
Joachim Thomas - [jthomas--mail--evo--it] - ICQ 18088459
Member of ATO (italian Division) http://bilbo.di.unipi.it/~ato-it & Phoenix Consortium
Concerti - Gruppi Musicali & Locali http://concertitalia.supereva.it
Virtual PHOTO Gallery http://www.terzomercato.com/free/jt_home
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
-- Chris Holt