09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NumToStr Converts numeric value to string<br />

Example<br />

NumToStr (Numeric To String) is used to convert a numeric value to a string.<br />

VAR string str;<br />

str := NumToStr(0.38521,3);<br />

The variable str is given the value "0.385".<br />

reg1 := 0.38521<br />

str := NumToStr(reg1, 2\Exp);<br />

The variable str is given the value "3.85E-01".<br />

Return value Data type: string<br />

Arguments<br />

The numeric value converted to a string with the specified number of decimals, with<br />

exponent if so requested. The numeric value is rounded if necessary. The decimal point<br />

is suppressed if no decimals are included.<br />

NumToStr (Val Dec [\Exp])<br />

Val (Value) Data type: num<br />

The numeric value to be converted.<br />

Dec (Decimals) Data type: num<br />

Number of decimals. The number of decimals must not be negative or greater<br />

than the available precision for numeric values.<br />

[\Exp] (Exponent) Data type: switch<br />

To use exponent.<br />

<strong>RAPID</strong> Reference Manual 9-NumToStr-1

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

Saved successfully!

Ooh no, something went wrong!