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.

MAXIMUM<br />

Syntax<br />

MAXIMUM(dyn.array.var)<br />

Description<br />

The <strong>UniBasic</strong> MAXIMUM function returns the largest numeric value found in a<br />

dynamic array. This function ignores nonnumeric elements. If the array you specify<br />

contains only nonnumeric elements, MAXIMUM returns an empty string. If an<br />

element is empty, UniData treats it as 0.<br />

UniData treats all system marks (attribute, value, and subvalue marks)<br />

indiscriminately. That is, any value between two marks of any kind is taken as an<br />

element with respect to this function.<br />

Examples<br />

In the following example, the program segment prints 22:<br />

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

X = "12":@VM:"2":@FM:"dd":@FM:"9":@FM:"22"<br />

PRINT MAXIMUM(X)<br />

In the next example, the program segment prints 0 because W contains an empty<br />

element and no other numeric elements exist:<br />

W = "A":@FM:"B":@VM:"":@SM:"C"<br />

PRINT MAXIMUM(W)<br />

Related Command<br />

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

MINIMUM

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

Saved successfully!

Ooh no, something went wrong!