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

Evaluating words...

 [1/4] from: mgkiourt:otenet:gr at: 25-Sep-2001 19:14


Could you please elucidate the following taken from a textbook In the case of values that have a scalar datatype like decimal!, the evaluation results in the value itself. In more complex situations, a word may reference an instruction sequence. The value of the word is that sequence of instructions.During the value's evaluation, each instruction is evaluated. The evaluatiuon concludes with the last instruction in the expression sequence.Then the result of executing the last instruction in the expression sequence is returned as the value of that word.

 [2/4] from: twatkins:datajunction at: 25-Sep-2001 11:49


Rough Gestimate: If it's a simple operation(like an assignment or other math operation) the return value is the result of that operation(Decimal/Integer/...) if it is a more complex interaction(probably involving function calls and native stuff), then the return value(say if you are doing a one-liner with a lot of results returning as parameters for other function calls) might be some sort of pointer to the code that was/is processed(Instruction Sequence). It goes on to say that when that sequence is evaluated, the actual return value, is the return value of the last instruction(ie, you have a function that ends in an assignment, the return value of the function is the return value of that assignment) Of course I am just a lurker on the list, and I don't do much with Rebol, but this is MY interpretation from what I have seen on the list and the little coding I have done. ----- Original Message ----- From: "mgkiourt" <[mgkiourt--otenet--gr]> To: <[rebol-list--rebol--com]> Sent: Tuesday, September 25, 2001 11:14 AM Subject: [REBOL] Evaluating words... Could you please elucidate the following taken from a textbook In the case of values that have a scalar datatype like decimal!, the evaluation results in the value itself. In more complex situations, a word may reference an instruction sequence. The value of the word is that sequence of instructions.During the value's evaluation, each instruction is evaluated. The evaluatiuon concludes with the last instruction in the expression sequence.Then the result of executing the last instruction in the expression sequence is returned as the value of that word.

 [3/4] from: ralph::abooks::com at: 25-Sep-2001 13:00


> Could you please elucidate the following taken from a textbook > "In the case of values that have a scalar datatype like decimal!,
<<quoted lines omitted: 6>>
> instruction in the expression sequence is returned as the value > of that word."
Urk! I hope that's not in my book<g>. --Ralph Roberts author, REBOL FOR DUMMIES

 [4/4] from: lmecir:mbox:vol:cz at: 25-Sep-2001 22:07


Hi,
> > Could you please elucidate the following taken from a textbook > > "In the case of values that have a scalar datatype like decimal!, > > the evaluation results in the value itself. > > In more complex situations, a word may reference an instruction
sequence.
> > The value of the word is that sequence of instructions.During > > the value's evaluation, each instruction is evaluated.
<<quoted lines omitted: 6>>
> --Ralph Roberts > author, REBOL FOR DUMMIES
Oops! I don't want to explain the sentence you cite. (Romano would have to say that for me everything is either confusing, misleading, unclear or wrong!) I offer you a replacement instead: 1) A word can refer to a value. 2) If a word (meant as a value of the WORD! datatype) is evaluated, the type of the value it refers to is checked. If the value the word refers to has one of the following types: ANY-FUNCTION!, LIT-WORD!, SET-WORD!, LIT-PATH!, PATH!, SET-PATH!, then the value is further processed by the interpreter in accordance with its actual type. E.g. for ANY-FUNCTION! the interpreter collects argument values and evaluates the function supplying it the collected arguments. Only if the value referred to by the word does not have one of the above mentioned datatypes, it is not processed any further and it immediately becomes the result of the evaluation. Ladislav

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted