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

[REBOL] Re: Context - code included- 2nd version

From: lmecir:mbox:vol:cz at: 14-Sep-2001 0:40

Lots of comments: you don't have to agree or understand. I am sorry if I made you think otherwise.
> 1) > "Message ID: not-defined > A word used was not defined within any context. > Message: > [:arg1 "is not defined in this context"]" > > Tell me how you can explain the word "any". When a word is in a context,
> that context can give a definition to the word, so why to speak of "any" > others contexts?
The above formulation isn't mine. What I see is, that it looks very confusing. A code sample: spc: first to block! "rebol" error? get/any spc ** Script Error: rebol is not defined in this context ** Where: halt-view ** Near: error? get/any spc If you don't tell me, what does the "any" mean in this case, I don't know.
> 2) "A variable refers to a specific value only within a defined context,"
> 2-9 > > So when it doesn't "refers to a specific value" (=get fails SpecialWord) it > is not "within a defined context" >
I show you another example of the same reasoning: I am sleeping only if I am in my bed. - true, at least for me So when I am not "sleeping" I am not "in my bed" - false 8^) ...snip...
> 4) "The scope of a variable is determined when its context is defined." > Ergo: context of a word can be undefined.
No, wrong reasoning again: Zero is equal to zero when one is equal to one. Ergo: one can be not equal to one. ...snip...
> 8)"A variable refers to a specific value only within a defined context,
> as a block, > a function, or an entire program. Outside that context the variable can
> to some > other value or to no value at all."
The above sentence I read as: "a block can be a context" or "a function can be a context" or "an entire program can be a context". Highly confusing. ...snip...
> A word is a variable if it has a value, and it has a value if is defined
in a
> context. Outside a context the word can have a value if is defined in
> context, or it can have no value and in this case is "not defined within
> context".
> So my functions could become (restricting the use of word "symbol"): > > variable?: binded? ... > symbol?: not binded? ...
I am sure that you either haven't understood the text or that the text has confused you. The meaning of it is, that you have got two ways how you can use any word: 1) use it as a symbol 2) use it as a variable