[REBOL] Re: localized func alternative...
From: brett:codeconscious at: 28-Feb-2004 15:39
> The best way to achieve this (IMHO) is to simply use CONTEXT. This sets
> everything within an object and you can set global words using SET. A
> about setting words this way though, they have the context of the CONTEXT
> they are set in so while they are global, their values are relative to the
Just a clarifcation for REBOL learners.
Set used this way normally does set global words but only because the word
you give to Set is global in the first place. Give Set a word from another
context (a non-global context) and it will happily set that word in that
context - Set is not limited to global words. For example:
ctx-1: context [
ctx-2: context [
set 'word-one "one"
>> print ctx-1/word-one