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

[REBOL] Re: Accessing nested Blocks + search in blocks

From: jthomas:apollo:evo:it at: 4-Nov-2000 19:19

Hello Andrew On 03-Nov-00, Andrew Martin wrote:
>AM Joachim Thomas wrote: >AM> having this >AM> >AM> myblock: [[one [1 2 3]][two [4 5 6]][three [7 8 9]]] >AM> >AM> I can extract a value and put it in >AM> >AM> myvalue: myblock/1/2/3 >AM >AM> but if I change myvalue: the result is only local, not global to >AM> myblock, >AM so >AM> >AM> is there a way to assign the content of myblock, like a pointer, to >AM> the >AM variable... >AM >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 3 >AM>> myblock/1/2/3: "I'm a new value!" >AM == [1 2 "I'm a new value!"] >AM>> myblock >AM == [[one [1 2 "I'm a new value!"]] [two [4 5 6]] [three [7 8 9]]] >AM
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? Thanx.. Regards -- Joachim Thomas - [jthomas--mail--evo--it] - ICQ 18088459 Amiga1260+Amiga4060PPC604 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. Reboot now? -- Chris Holt