Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional operator?
#9
More precisely, Sinclair BASIC evaluates "x AND y" as follows:

Code:
x AND y results x, when y is not zero
X AND y results 0, when y is zero

And Boriel ZX Basic evaluates "x AND y" as follows:

Code:
x AND y results 1, when both x and y are not zero
X AND y results 0, when either x or y is zero

You only notice the difference when x is neither 1 or 0.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)