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.

NOT<br />

Syntax<br />

NOT(expr)<br />

Description<br />

The <strong>UniBasic</strong> NOT Boolean operator inverts the logical result of the argument expr.<br />

If the expression is true, the function returns 0 (false). If the expression is not true,<br />

the function returns 1 (true).<br />

Example<br />

In the following example, the program segment compares X to Y (false because X is<br />

not greater than Y) and inverts the result, evaluating to true instead. Next, the THEN<br />

statement executes, sending program control to the label specified by RETRY.<br />

X = 1 ; Y = 2<br />

IF NOT(X > Y) THEN GOSUB RETRY:<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

#, NOTS<br />

NOT 1-481

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

Saved successfully!

Ooh no, something went wrong!