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.

ABS<br />

Syntax<br />

ABS(expr)<br />

Description<br />

The <strong>UniBasic</strong> ABS function returns the positive numeric value (absolute value) of<br />

the argument. expr can be any numeric expression.<br />

Examples<br />

In the following example, the program segment prints the absolute value of the<br />

variable NUM, which is 999:<br />

NUM = -999<br />

PRINT ABS(NUM)<br />

In the next example, the program statement replaces the variable NUM with its<br />

absolute value:<br />

NUM = ABS(NUM)<br />

Related Command<br />

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

NEG<br />

1-74 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!