(test) ? a:b
greg.ewing at canterbury.ac.nz
Mon Oct 27 10:04:02 CET 2014
Michael Torrie wrote:
> As far as I can tell, no BASIC dialect I've looked at (DOS and Linux
> worlds only), has ever had any logical operators like AND (&&), OR (||),
> and NOT (!). They only appear to have bitwise operators (&,|,~ C
> equivalent). The fact that comparison operators returned 0 and -1 made
> the bitwise operators function the same as logical.
Applesoft used 0 and 1, so its NOT definitely wasn't bitwise
on the whole number. I can't remember what its AND and OR did
for numbers other than 0 or 1 (if I even thought to try it),
but since it did all arithmetic in floating point, I suspect
they were logical rather than bitwise.
More information about the Python-list