09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

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.

ValToStr Converts a value to a string<br />

Example<br />

ValToStr (Value To String) is used to convert a value of any data type to a string.<br />

VAR string str;<br />

VAR pos p := [100,200,300];<br />

str := ValToStr(1.234567);<br />

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

str := ValToStr(TRUE);<br />

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

str := ValToStr(p);<br />

The variable str is given the value "[100,200,300]".<br />

Return value Data type: string<br />

Arguments<br />

Syntax<br />

The value converted to a string with standard <strong>RAPID</strong> format. This means in principle<br />

that decimal numbers are rounded off to 5 places of decimals, but not with more than<br />

6 digits.<br />

A runtime error is generated if the resulting string is too long.<br />

ValToStr ( Val )<br />

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

A value of any data type.<br />

ValToStr’(’<br />

[ Val ’:=’ ] <br />

’)’<br />

A function with a return value of the data type string.<br />

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

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

Saved successfully!

Ooh no, something went wrong!