------------Original Message:
From: "Chuck Guzis" <cclist at sydex.com>
Subject: Re: HP "calculators" (was Re: World's first computer on
ebay!)
On 14 Apr 2007 at 1:34, der Mouse wrote:
Well, and, this is an expression rather than a
statement; you could do
things like R(X+(1->C))->A (somewhat akin to the way C lets you write
a=r[x+(c=1)]) - did any BASICs do that?
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:
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.
mike