Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Context and Rebol call

From: AJMartin::orcon::net::nz at: 14-Oct-2004 13:43

Hi, Philippe. You wrote:
> 1/ About 'context : what's the difference for Rebol between : >>> my-context: context [ ....bla bla bla ... ] > and >>> context [ ....bla bla bla ... ] > > I noted that the first code just set one word ('my-context) in global > context, but the other ?
This situation is the same as:
>> My-Integer: 2
>> 2
In all cases, Rebol evaluates each value and, as part of it's evaluation, evaluates any necessary values to the right. When Rebol evaluates the value to the right of the set-word (in the first example) or the first value, the value is returned to form the value needed for the previous value's evaluation. So the context (or 2, in my second example) is evaluated, producing a Rebol value. That value is then used as input for the previous value to the left. If there's no set-word! value, then nothing much further happens. The set-word! assigns the value of the expression to the right to the word contained in the set-word!. I hope that helps! --- Andrew Martin ICQ: 26227169