Hi Gerard,
>Hi List,
>
>Recently I worked with get to retrieve a value indirectly as in the following
>exemple :
>
>
>
>>>n1: 125
>>>
>>>
>== 125
>
>
>>>n2: "n1 " <-- Suppose a parsed value that is the name of an identifier.
>>>
>>>
>== "n1 "
>
>
>>>get 'n1
>>>
>>>
>==125
>
>but this time REBOL 1.3 seems to refuse the following sequence of statements
>and I must admit that I can't understand why ?
>
>
>
>>>n1
>>>
>>>
>== 125
>
>
>
>>>get 'n1
>>>
>>>
>== 125
>
>
>
>>>n2
>>>
>>>
>== "n1 "
>
>
>
>>>join "'" n2
>>>
>>>
this step is wrong. What you need is a word. There are two possibilites:
1) *Not* converting a string:
a-word: 'n2
2) Converting a string:
a-word: to word! trim "n2 "
Notice I didn't need REDUCE at all (important) and I didn't need #"'"
either. Moreover, notice I trimmed the string to leave out space.
>Is 'n1 not equal to 'n1 from its assembled parts ???
>
>
Here is what you get:
a-word: 'n2 ; == n2
mold a-word ; == "n2"
b-word: to word! "'n2 "
mold b-word ; == "'n2 " (notice the difference!)
>Thanks for your explanations
>
>
>
You are welcome.
-Ladislav
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.