[REBOL] Re: Context - code included- 2nd version
From: rotenca:telvia:it at: 11-Sep-2001 0:52
> Hi,
Hi,
> > do (all but block)
>
> I don't think the last one is correct...
Sure?
> to
> make
Merci!
> I am trying to comply with the official documentation if possible:
>
> special: first to block! "a"
> set special 1
> ** Script Error: a is not defined in this context
> ** Where: halt-view
> ** Near: set special 1
>
> This is how I can interpret it:
>
> 1) the word 'a stored in 'special is "in a context"
> 2) it is "in a context" where it "isn't defined"
> 3) I call that context the Special Context
My interpretation:
in the actual context (global+locals) the word is not binded (defined).
Es.
>> specials: to block! "a"
== [a]
>> set first specials 1
** Script Error: a is not defined in this context
** Near: set first specials 1
>> bind specials 'system
== [a]
>> set first specials 1
== 1
It is true that bind replaces the words it binds, but what can we ask to an
error message?
> OTOH, it is my definition. For me it is the simplest definition. Didn't try
> to invent any other, I confess...
It is only a linguistic question, i agree.
> As to whether the Special Context is a Context: it depends on definition. I
> wrote a definition which is telling me, that it is a Context.
I don't want to stress you about this very little question but I can't resist
(sorry). You say:
I define a function, that can find out, if two given Words are bound to the
same Context:
now: in the function same-context?:
...
special? word1
special? word2
...
which use the error:
Script Error: wordx is not defined in this context.
Which says that the word1 and word2 are not y
defined(word1)<>y and defined(word2)<>y -> context(word1)=context(word2)
is a logical error for me, but perhaps I'm in error.
In effect:
bind 'something SpecialWord
Script Error: SpecialWord is not defined in this context
Why a word must be defined to bind something to it? Because defined = binded
to a context.
If the last command could create a Special Word I should admit to be wrong.
We could call Special Context the Fail or Error Context. :-)
Excuse me again for my insistence really out of place.
> Cheers
> Ladislav
---
Ciao
Romano