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

[REBOL] Another problem with dynamically getting a value

From: gerardcote:sympatico:ca at: 31-Oct-2005 20:52

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
== "'n1 "
>> reduce join "'" n2
== "'n1 "
>> to-word reduce join "'" n2
== 'n1
>> type? to-word reduce join "'" n2
== word!
>> get to-word reduce join "'" n2
** Script Error: 'n1 has no value ** Where: halt-view ** Near: get to-word reduce join "'"
>>
Is 'n1 not equal to 'n1 from its assembled parts ??? I know that n1 has the value 125. It seems that it's not the case but I can't explain the issue. Thanks for your explanations