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.

SADD<br />

Syntax<br />

SADD(x, y)<br />

Description<br />

The <strong>UniBasic</strong> SADD function adds two string numbers and returns the result as a<br />

string number. SADD is the string addition function. 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 in 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 SADD 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 SADD function in any expression in which a standard number is<br />

valid.<br />

Note: The result of the SADD function cannot exceed the maximum allowable<br />

number determined by your hardware.<br />

Example<br />

In the following example, the program statement assigns to variable B the sum of the<br />

string constant (1.4149) and variable A:<br />

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

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