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

Addition bug

 [1/3] from: anton::lexicon::net at: 3-Dec-2002 0:51

This is seen on latest beta REBOL/View 3-Aug-2002
>> 1 + + 2 3
** Script Error: Cannot use add on op! value ** Near: 1 + + 2 3 The above may be another aspect of a bug I have already reported:
>> (+ 1 2) >>
(Instead of 3 it returns an op! value.) Anton.

 [2/3] from: greggirwin:mindspring at: 2-Dec-2002 12:25

Hi Anton, A> The above may be another aspect of a bug I A> have already reported: A> >> (+ 1 2) A> >> A> (Instead of 3 it returns an op! value.) Is + documented as allowing that notation? I thought it was strictly an infix operator, in which case it should flag an error about missing an operand, correct? -- Gregg

 [3/3] from: anton:lexicon at: 3-Dec-2002 16:57

Yes, the math operators are special in that they *also* allow you to write them as infix operators. I think back in the mists of time they started out equal to all other rebol functions, only accepting the two arguments to the right. Then, due to popular demand they added the infix notation to them. Just try it, in any rebol except the latest view beta 1.2.8
>> + 1 2
== 3 Anton.