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.

NE<br />

Syntax<br />

expr1 NE expr2<br />

Synonyms<br />

#, , ><<br />

Description<br />

The <strong>UniBasic</strong> NE relational operator tests whether expression expr1 is not equal to<br />

expr2.<br />

expr1 and expr2 can be any valid <strong>UniBasic</strong> expressions, variables, strings, or literals.<br />

Tip: You can also use the # symbol to negate other relational operators. For example,<br />

the following statement uses the # symbol to negate the > symbol. In this case, if X is<br />

not greater than Y, the program branches to label 1000.<br />

IF X #> Y THEN GOSUB 1000<br />

Examples<br />

The following program segment is taken from the sample program in Appendix A,<br />

“Sample Program,” in Developing <strong>UniBasic</strong> Applications. In the first statement, if<br />

the variable NEW.PRICE is not equal to an empty string, the variable is written to the<br />

seventh element in array ORDER.REC.<br />

1-474 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

IF NEW.PRICE NE '' AND NUM(NEW.PRICE) THEN<br />

ORDER.REC = NEW.PRICE<br />

NEED.TO.WRITE = 1<br />

END

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

Saved successfully!

Ooh no, something went wrong!