Hmm, I see what you mean.(;-)>
I think it's a matter of context.
The Rebol dictionary says that "IN" is used to:
"Return word reference within another context. Normally used with SET and GET."
It looks to me like the "set in" construction allows you
to access the variables within an object (another context) and change their
values,but does not let you add or delete any of those variables.
This gives the object a degree of protection from outside agencies
changing the basic nature of the object.
This way a programmer can create an object and, by using "set in" and "get in," allow
limited reading and altering of it's internal values without allowing changes to its
makeup.
I'm not sure what sort of protection scheme can prevent changing the object by
redefining it as in the solution provided by others, but I'll bet there is ,or will be
a way.
I think your creation of the "test-word" variable only worked because it was within
the same context.
Or maybe not,
Greg
---------- Original Message ----------------------------------
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Wed, 7 Jun 2000 14:42:38 -0500
>> "set" means "assign a value to," as when
>> you declare a variable and then assign it a value.
>>
>> You were trying to assign a value to a variable that
>> did not exist.
>
>Yes, but that IS the purpose of "set"
>
>>> set 'test-word "test words"
>== "test words"
>>> print test-word
>test words
>>>
>
>I have just assigned a value to a variable that previously did not exist.
>
>Thus, reading that I can...
>
>>>set in object 'word value
>
>makes perfect sense.
>
>