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

[REBOL] Re: an awful 'to-word bug...

From: Christophe:Coussement:mil:be at: 10-Sep-2003 8:11

Hi Andrew,
> Christophe wrote: > > >> a-block > > == [label1 "test" label2 "test"] > > One of the problems of this approach is that your code has to > "know" the > labels, like: > > > >> a-block/label1 > > == "test" > > Have you considered something like this: > > >> a-block: ["label1" "test" "label2" "test"] > == ["label1" "test" "label2" "test"] > >> select a-block "label1" > == "test" > >> L: "label2" > == "label2" > >> select a-block L > == "test" >
Actually, the approach you describe is the one i use when it goes about dynamic adressing, as in:
>> labels: ["label1" "label2" "label3"] >> foreach label labels [select a-block label]
But in this particular case of use, i have to adress deep nested informations, and the path notation seems more appropriate to me:
>> bennet_raw: ab_results/bennet/total/scale/score/raw/
I guess it's more a coding convention we use inside the project: a label should be word! Thanks for your suggestion ;-)) ==xtof