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.

SSUB<br />

Syntax<br />

SSUB(x, y)<br />

Description<br />

The <strong>UniBasic</strong> SSUB function subtracts the second string number from the first string<br />

number and returns the result as a string number. Arguments can be any valid<br />

numbers or string numbers of any magnitude or precision.<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 of a variable is determined by the data first loaded into it.<br />

If x or y contains nonnumeric data, UniData displays an error message and returns a<br />

result of 0.<br />

The SSUB function results in a string number, so you can use the function in any<br />

expression in which a string number is valid. Because string numbers can exceed the<br />

range of numbers that standard arithmetic operators can accommodate, you might not<br />

want to use the SSUB function in any expression in which a standard number is valid.<br />

Example<br />

In the following example, the program statement assigns to B the result of subtracting<br />

1.4149 from A, and then prints the answer 98.5851:<br />

A = 100<br />

B = SSUB(A, "1.4149")<br />

PRINT B<br />

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