On 14 Apr 2007 at 4:38, M H Stein wrote:
------------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.
I suspect that maybe you did.
der Mouse said " things like R(X+(1->C))->A ". That looks like a
multiple assignment to me.
I said "X=Y=7" in GWBASIC changes both X and Y the same way
regardless of their initial values. LET X=Y=7 changes them a
different way, regardless of their initial values. If there's a
conditional operator in either of those statements, I can't find it.
Yes, it's true that BASIC doesn't differentiate lexically between the
assignment operator and equality test, but that seems to be unrelated
to the behavior of the two statements I gave. In fact, I don't know
what the operation performed by GWBASIC is in "X=Y=7".
Cheers,
Chuck