I think it's very easy, if i understand you right. Use this for example:
>> test: 99 == 99 >> name: "test" == "test" >> name == "test" >> make word! name == test >> do make word! name == 99 Tim make word! "test" Gerard Cote wrote: >Thanks Izkata, > >This is just what I need. >I must admit that until you submitted your own solution I had not been able to >figure the exact syntax by my self... >But I was not very far of yours! > >In fact my use of get in waas incorrect - I was missing the required type >conversion to-word !!! > >Regards, >Gerard > > >----- Original Message ----- >From: "Izkata" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, June 21, 2005 6:46 PM >Subject: [REBOL] Re: How to transform a string into a word and get its >associated value > > > > >>>>A: 250 >>>> >>>> >>== 250 >> >> >>>>B: "A" >>>> >>>> >>== "A" >> >> >>>>get in system/words to-word B ;one-line way to do it >>>> >>>> >>== 250 >> >> >>>>C: to-word B ;two-line way to do it >>>> >>>> >>== A >> >> >>>>system/words/:C >>>> >>>> >>== 250 >> >>You're using a string, that's to problem.. But I thank you for >>asking in that way, I needed this very thing for something of my >>own and couldn't figure it out before now! >> >> -Izzy Boy >> >> >> >> >>>Hi list, >>> >>>Since I got no cue about my recent parse submit, I will restructure my >>>problem another simpler way: >>> >>>I have some word called 'name and its associated integer value 250. >>> >>> >>>>>name: 250 >>>>> >>>>> >>>== 250 >>> >>>I can verify the value associated with the word 'name from the global >>>system/words object. >>> >>> >>>>>print system/words/name >>>>> >>>>> >>>250 >>> >>>Now for the difficult part (at least to me). I get another word called >>>'info that contains a reference to my former word 'name. >>> >>> >>>>>info: "name" >>>>> >>>>> >>>== "name" >>> >>>When I ask to display its value, the word name is correctly associated but >>>it remains a string and is in no way considered as a real >>>word called 'name. >>> >>> >>>>>print system/words/info >>>>> >>>>> >>>name >>> >>>What I would get is a substitution of the string "name" for the real word >>>'name and then the associated value could be accessed - >>>indirectly. >>> >>>I feel there is some way to do it but I can't up to now say which it is >>>???? >>> >>>I tried some basic knowledge I have but the result is not the one I want. >>> >>> >>>>>print system/words/:info >>>>> >>>>> >>>** Script Error: Invalid path value: name >>>** Where: halt-view >>>** Near: print system/words/:info >>> >>>May be I could join or append the 2 parts (system/words and info) in some >>>way but I have yet to get it done. >>> >>>Thanks, >>>Gerard >>> >>> >>>-- >>>To unsubscribe from the list, just send an email to >>>lists at rebol.com with unsubscribe as the subject. >>> >>> >>> >>> >>-- >>To unsubscribe from the list, just send an email to >>lists at rebol.com with unsubscribe as the subject. >> >> > > > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
