Hi Anton

> Thanks guys,
>
> I've got DocKimbel's help patch,
> and Bo's browse-system.r.
>
> I really do need to spend some time
> poking through the system object more.

Yes! Currently that is the only way to move to guru status.

> One question:
> Is everything contained in the system object?

Short answer: Yes. Actually SYSTEM also has another name REBOL, it is the
root of the rebol system.

> Are all objects in 'system ?

Yes, but only those which are built-in at startup appear in the system
hierarchy. Of course, you can add to or modify the hierarchy (exercise
caution):

>> system/user: make system/user [nick: "sneaky"]
>> help system/user
OBJECT: user

WORDS:
     email  -- (Type: email)
     home   -- (Type: none)
     name   -- (Type: none)
     nick   -- (Type: string)
     words  -- (Type: none)

SUB-OBJECTS:
    (none)

FUNCTIONS:
    (none)

>> system/user/nick
== "sneaky"

So we have actually redefined part of the REBOL system.

> All words and objects defined by me -
> do they end up in 'system somewhere?

Yes, but not in the system hierarchy (unless you put them there as above).
In one sense of your question, "everything" is in system/words. It is the
dictionary or symbol table for the current invocation. The expression

first system/words

gives a block of all words seen by the scanner whether defined or not, in
all contexts.

The expression

second/system/words gives the corresponding block of *globally* known values
(may be unset!). In other words, it only gives a value if the word has a
value in the global context.

A good example of using these is:

>>source help

To track what you have defined, put this in your user.r

antons-stuff: 0

Then at any point in a script or console session,

>>find first system/words 'antons-stuff

returns a list of all the words you have used and their values (in the
global context) are the corresponding entries in the block returned by
second system/words.

May the source be with you, young Jedi ;-)

Cheers

-Larry

PS Things are actually a little more complicated than indicated above, but
this will put you on the right track.

> Anton


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to