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

[REBOL] Re: Parsing comment

From: g:santilli:tiscalinet:it at: 26-Sep-2002 1:22

Hi Dick, On Thursday, September 26, 2002, 2:30:45 AM, you wrote: run> 10 + 10 run> means something to the Rebol interpretation process, but run> 10+10 does not have the same meaning, yet you say it can be
>> length? [a + b]
== 3
>> length? [a+b]
== 1
>> a+b: func [x] [print x] >> a+b "hello"
hello REBOL needs spaces to separate words.
>> foreach value [a + b] [print type? value]
word word word You just have three words. REBOL does not make any assumption on their meaning, like other languages do.
>> foreach value [print (a + b)] [print type? :value]
word paren
>> foreach value second [print (a + b)] [print type? :value]
word word word This shows what I was saying in the last message. Now, you do whatever you wanted with that block of values, even interpreting it with your own interpreter. Or, you could give those words a meaning different from the usual one (like Ladislav did in his message) and let the REBOL interpreter evaluate it. Still, you can't say that that block block will "print the sum of a and b on screen" unless you know the context in which the expression is "evaluated". (We're already making assumptions, when we talk about "expressions" and "evaluation"...) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r