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.

StrToVal Converts a string to a value<br />

Example<br />

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

VAR bool ok;<br />

VAR num nval;<br />

ok := StrToVal("3.85",nval);<br />

The variable ok is given the value TRUE and nval is given the value 3.85.<br />

Return value Data type: bool<br />

Arguments<br />

Example<br />

TRUE if the requested conversion succeeded, FALSE otherwise.<br />

StrToVal ( Str Val )<br />

Str (String) Data type: string<br />

A string value containing literal data with format corresponding to the data type<br />

used in argument Val. Valid format as for <strong>RAPID</strong> literal aggregates.<br />

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

Name of the variable or persistent of any data type for storage of the result from<br />

the conversion. The data is unchanged if the requested conversion failed.<br />

VAR string 15 := “[600, 500, 225.3]”;<br />

VAR bool ok;<br />

VAR pos pos15;<br />

ok := StrToVal(str15,pos15);<br />

The variable ok is given the value TRUE and the variable p15 is given the value<br />

that are specified in the string str15.<br />

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

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

Saved successfully!

Ooh no, something went wrong!