> 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!
>
> can you perhaps construct the simplest example that illustrates
> your point ?

Um.. yeah that particular ramble lacked some context :)
I was referring to the interpretation of something being different in
different contexts.
While it's not automatic, the language facilitates it. Anyway here's an
example.

REBOL [
    Author: "Brett Handley"
    Purpose: {An example of how one description can be interpreted
              differently according to context.}
]

cat-description: ["The cat is" cat]

; A symbol in the global context.
cat: "Feline"

example-specific-context: make object! [
    cat: "Tiddles"
    work-in-context: func[][

        ; Make the words of cat-description have this
        ; context's specific meaning - is permanent.
        bind cat-description 'self

        print cat-description
    ]
]

print cat-description
example-specific-context/work-in-context


Reply via email to