AFAIK, none of the usual suspects permit multiple
assignments in a
statement. The odd thing is that GWBASIC will pass a statement of
the form X=Y=7, but Y will be 0 and X will be -1 at the conclusion
of execution, regardless of the value of y or x at the beginning.
OTOH, LET X=Y=3 will set both X and Y to 0. GWBASIC is full of
stuff like this.
------------Reply:
On Sat, 14 Apr 2007, M H Stein wrote:
Eh???? Did I miss something?
Those are not multiple assignments but very useful logical tests.
If a logical argument is true, it has the numeric value of -1, else 0,
thus, if Y=7 then x= -1 else x= 0, whether you LET it or not, at least
in the BASICs I work in (and even GWBASIC ;-). When you add and
multiply with it, it can be very handy in certain situations.
That's one of the reasons for LET, to avoid the ambiguity of X=Y being
either an assignment or a numeric value.
So, apparently it is parsing it as x = (Y==7);
An alternative to LET is to have different symbols for assignment v
comparison. == , .EQ. etc
I always liked the APL X <- 3,
which also avoids the beginner mistake of 3 = x