Logical operations: Difference between revisions
Logical operations in QBasic and Yabasic
mNo edit summary |
(Logical operations in QBasic and Yabasic) |
||
Line 562:
170 PRINT 2 BOR 15
180 PRINT (A BOR B)-(A BAND B) ! xor</lang>
==={{header|QBasic}}===
{{works with|QBasic|1.1}}
No booleans in BASIC... these are integers. -1 for True 0 for False.
<lang qbasic>b1 = -1
b2 = 0
PRINT b1 AND b2
PRINT b1 OR b2
PRINT NOT b1</lang>
==={{header|Yabasic}}===
<lang yabasic>b1 = true //value of 1
b2 = false //value of 0
print b1 and b2
print b1 or b2
print not b1</lang>
==={{header|QuickBASIC}}===
|