[REBOL] Re: Context and Rebol call
From: lmecir:mbox:vol:cz at: 14-Oct-2004 16:31
>Hello, rebolers !
>Two questions in my mind today :
>1/ About 'context : what's the difference for Rebol between :
>>>my-context: context [ ....bla bla bla ... ]
>>>context [ ....bla bla bla ... ]
>I noted that the first code just set one word ('my-context) in global con
not exactly, see this:
my-context: make object! [
print ["just creating a new object with attribute" attribute]
it creates an object and runs some code (prints). Later you can use
my-context as a data-container containing just the value of the ATTRIBUTE.
>but the other ?
the other only creates an object executing the code. The object is
collected afterwards. The main purpose for doing it this way is to
prevent the Global Context Pollution, because the code will not
interfere with any global ATTRIBUTE that might exist.