> With respect to
>
> > So now, I don't tend to think of global variables as just that.
> Instead I
> > know I can create symbols in a global context, and I can also set
> symbols in
> > a specific context. And I can write Rebol descriptions that will work
> on
> > both depending on context!
>
> c
Hi Rebols,
Brian wrote:
> Here's some REBOL pseudo-code of this (for block! spec):
> make-object: func [spec [block!] /local c o] [
> c: copy [self]
> foreach x spec [
> all [
> set-word? x
> none? find c (x: to-word x)
> insert tail c x
Hi all!
[EMAIL PROTECTED] wrote:
>Hello [EMAIL PROTECTED],
>
>On 19-Jul-00, [EMAIL PROTECTED] wrote:
>
> > [EMAIL PROTECTED] wrote:
> >
> >> In REBOL you don't only have two scopes (contexts) - you have a tree
> of contexts, each one with a parent context, the top level context being
> what you
Hi Keith!
[EMAIL PROTECTED] wrote:
>I've been wondering what the reasoning behind REBOL's scoping
>rules was for awhile. In C, for instance, any variable that
>you declare in a function is "automatic" (that's what C calls
>them anyway :). They're automatically local to the function
>they're defi
gt;
Sent: Tuesday, July 18, 2000 10:58 PM
Subject: [REBOL] REBOL's scoping rules Re:
> Judging by previous message on the list, this question will bring a
variety
> of responses!
>
> Re "global variables".
> Coming from a compiled-language background, it was hard for me
Judging by previous message on the list, this question will bring a variety
of responses!
Re "global variables".
Coming from a compiled-language background, it was hard for me to learn
about the immediate nature of the message I send to Rebol. More important, I
had to get out of my old ideas of t
[EMAIL PROTECTED] wrote:
> In REBOL you don't only have two scopes (contexts) - you have a tree of contexts,
>each one with a parent context, the top level context being what you could call
>global variables.
This is probably not true; each context is independent from the
others.
> As you can
Hi,
> > I've been wondering what the reasoning behind REBOL's scoping
rules was for
> > awhile. In C, for instance, any variable that you declare in a
function is
> > "automatic" (that's what C calls them anyway :). They're
automatically local
> > to the function they're defined in, etc.
(...)
>
[EMAIL PROTECTED] wrote:
> Why does REBOL have variables be globally scoped by default? I ran into this
Because REBOL does not have something like a "scope". Notice that
there are no variables at all, only values.
Some of these values, called "words", have the ability to refer to
other values.