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.

SCMP<br />

Syntax<br />

SCMP(x, y)<br />

Description<br />

The <strong>UniBasic</strong> SCMP function compares two string numbers and returns a value<br />

depending on the result of the comparison. Arguments can be any valid numbers or<br />

string numbers of any magnitude or precision. If x or y contains nonnumeric data,<br />

UniData displays an error message, and the comparison returns 0.<br />

SCMP Function Return Values<br />

The SCMP function returns one of the values described in the following table.<br />

Comparison<br />

x < y -1<br />

x = y 0<br />

x > y 1<br />

Returning<br />

Value<br />

SCMP Function Return Values<br />

Tip: Processing string data-type numbers rather than numeric data-type numbers<br />

degrades processing speed. Numbers specified in quotation marks are string data<br />

type. Numbers specified without quotation marks are numeric data type. The data<br />

type in a variable is determined by the data first loaded into it.<br />

SCMP 1-699

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

Saved successfully!

Ooh no, something went wrong!