11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PWR<br />

Syntax<br />

PWR(num.expr1, num.expr2)<br />

Description<br />

The <strong>UniBasic</strong> PWR function raises expr1 to the power of expr2.<br />

Note: PWR is synonymous with two asterisks (**) or ^.<br />

Example<br />

In the following example, the program segment raises variable X to the power of 3,<br />

first using exponentiation operator **, then using the PWR function, and finally<br />

using the exponentiation operator ^. The results are identical.<br />

X = 2<br />

PRINT X**3<br />

PRINT PWR(X,3)<br />

PRINT X^3<br />

Related Command<br />

^<br />

1-593 <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!