[REBOL] Re: Special word was: help from Dixon or others about port
From: rotenca::telvia::it at: 7-Sep-2001 18:27
Thank you for port info.
Now i want "stress" you with another question, about your "Special Word"
I make a word:
>> word? first to-block "foo"
The function Special return true for:
Special? first to-block "foo"
is not in system/words:
find first system/words first to-block "foo"
and your Visualize-Context return:
either special? word [
But "foo" is not in the context...
I think this is a Very Very Special Word (note the 2 Very), because it is not
in a true (hidden/not hidden) context.
>> o: context to-block "foo2: 3"
>> find first system/words first to-block "foo2"
>> find first system/words/o first to-block "foo2"
Now: "foo2" is in the context "o" but not in the Global context.
So when we call visualize-context:
v-c bind first to-block "foo2" in o 'self
it doesn't see "foo2" because visualize-context scans system/words to find
foreach s-word first system/words [
if not same? s-word b-word: bind s-word word [
append result b-word
I think this is a Very Special Word (note the only one Very), because it is
not in the Global Context but is in a object! context.
The same thing can happen per Local words which exist like Local but not like
x: to-block "foo3"
use x compose/deep [find first system/words first [(:x)]]
z: func x compose/deep [y: [(:x)] print get first y find first system/words
>> z 6
Visualize-Context fails with these Locals for the same reason.
Rebol gives different errors for these different Special Words:
1) Script Error: foox is not defined in this context -> Very Special and
Very Very Special
2) Script Error: fooy has no value -> (Only)
For me the (Only) Special Words are only unset Global Word.
Ciao (my english is bad)