Re: Operator precedence bug?

From: Kish Shen <ks15_at_icparc.ic.ac.uk>
Date: Thu 15 Nov 2001 03:28:59 PM GMT
Message-Id: <E164ORn-0006oj-00@holborn.icparc.ic.ac.uk>
>There seems to be a precedence bug with respect to unary minus.  According

I don't think it is a bug as such. If you look at the definition for numbers,
you will find that +/- are part of the number (in the user manual). So -2
is not -(2).

If you have a variable, then you do get the precedence you expect for -/1:

[eclipse 1]: X = -Y*2, X =.. L.

Y = Y
X = -(Y * 2)
L = [-, Y * 2]

As to if it is right for -Y*2 to be treated differently from -3*2, that is
a different question.....:-)

Cheers,

Kish
Received on Thu Nov 15 15:29:00 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:11 PM GMT GMT