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.

NUMS<br />

Syntax<br />

NUMS(dyn.array)<br />

Description<br />

The <strong>UniBasic</strong> NUMS function determines, for each element of an array, if that<br />

element is numeric. If the element is numeric, NUM returns 1 in the corresponding<br />

position of the new array. For nonnumeric and multibyte characters, it returns 0.<br />

With null value handling on, this function returns 1 for the null value.<br />

The nonnumeric characters in the following table produce a result of 1.<br />

Example<br />

In the following example, the program segment determines whether each element of<br />

array CHARACTERS is numeric. The resulting array B contains 1}1}1}0}0.<br />

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

Character Description<br />

+ Plus sign<br />

- Negative sign<br />

. Decimal point<br />

Nonprinting Null value<br />

Nonnumeric Characters<br />

CHARACTERS = 123:@FM:456:@FM:-789:@FM:"ABC":@FM:"CDE"<br />

B = NUMS(CHARACTERS)

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

Saved successfully!

Ooh no, something went wrong!