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.

SMUL<br />

Syntax<br />

SMUL(x, y)<br />

Description<br />

The <strong>UniBasic</strong> SMUL function multiplies two string numbers and returns the result<br />

as a string number. Arguments can be any valid numbers or string numbers of any<br />

magnitude or precision. Using string numbers rather than standard numbers degrades<br />

processing speed.<br />

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

result of 0.<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 />

The SMUL 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 SMUL function in any expression in which a standard number is<br />

valid.<br />

Example<br />

In the following example, the program statement multiplies the constant (1.4149) by<br />

variable A and assigns the result to variable B:<br />

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

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