11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C-4 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

Boolean Operators<br />

The following table describes the Boolean operators for <strong>UniBasic</strong>.<br />

Operator Action Example<br />

AND, & When both expressions<br />

are true, the<br />

result is true.<br />

OR, ! When either<br />

expression is true, the<br />

result is true.<br />

NOT Inverts the result of<br />

conditional<br />

statements.<br />

NOTS Inverts the logical<br />

result of each element<br />

of a dynamic array.<br />

IF (X < Y) AND (Y < Z) THEN GOSUB<br />

1000<br />

IF (X < Y) OR (Y < Z) THEN GOSUB<br />

1000<br />

IF (X < Y) AND NOT (Y < z) GOSUB<br />

1000<br />

A = 1:@FM:0:@FM:1:@FM:30<br />

B = NOTS(A)<br />

B contains 0}1}0}0.<br />

Boolean Operators

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!