-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 22, 2000 7:50 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] System... and the other objects!

[snip]

>Now I have another question (sorry to bug you all, but the FAQ's just
>don't answer these ones):
>How can I know wich objects, variables and other things exist under an
>object?!
>It's like this: I know that under system I have schemes. (system/schemes).
>How can I know all the objects under a certain object?!

; Do you want to print the elements of an object? That's in the user's
guide.
; Here's a useful little function I wrote and stuck in my user.r:

print-obj: func [some-obj [object!]][
        foreach elem next first some-obj [
                print rejoin [elem ":^(tab)" get in some-obj elem]
        ]
]

; then try:

print-obj system
print-obj system/schemes

; it fails on:

print-obj system/words

; 'cause it doesn't like the unset! element (word). To list the system
words,
; us the more basic commands:

print mold next first system/words

; - Michael Jelinek

Reply via email to