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

[REBOL] Re: Accessing nested Blocks

From: al::bri::xtra::co::nz at: 4-Nov-2000 8:07

Joachim Thomas wrote:
> having this > > myblock: [[one [1 2 3]][two [4 5 6]][three [7 8 9]]] > > I can extract a value and put it in > > myvalue: myblock/1/2/3 > but if I change myvalue: the result is only local, not global to myblock,
so
> is there a way to assign the content of myblock, like a pointer, to the
variable...
>> myblock: [[one [1 2 3]][two [4 5 6]][three [7 8 9]]]
== [[one [1 2 3]] [two [4 5 6]] [three [7 8 9]]]
>> myvalue: myblock/1/2/3
== 3
>> print myvalue
3
>> myblock/1/2/3: "I'm a new value!"
== [1 2 "I'm a new value!"]
>> myblock
== [[one [1 2 "I'm a new value!"]] [two [4 5 6]] [three [7 8 9]]] Andrew Martin Caution: Only Rebol spoken here... ICQ: 26227169 http://members.nbci.com/AndrewMartin/