18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

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.

Appendix: Built-in Scripting Language<br />

If Array[10] = 65, Array[11] = 66, and Array[12] = 67, then the returned value will be "ABC":<br />

ValueToChar( "Array[10]", 3 )<br />

ValueWToChar<br />

This function converts an integer array of Unicode character codes to a string, where each value in the array<br />

is a double-byte word.<br />

Function Group Execution Windows Embedded Thin Client<br />

ValueWToChar String Synchronous Supported Supported Supported<br />

Syntax<br />

ValueWToChar("tagArray",numQtdChars)<br />

tagArray<br />

numQtdChars<br />

The name of the integer array containing the double-byte values to be converted. If no array<br />

index is specified, then the default is 0.<br />

Note: The tag name must be enclosed in quotes, as shown in the syntax<br />

diagram, or else the project will try to get the value of the named tag.<br />

The number of values to be converted (minimum of 1), starting with the specifed array index.<br />

Returned value<br />

Returns a string comprising the converted values.<br />

Notes<br />

Each value in the array must be a double-byte word, and each word will be split into two bytes for conversion.<br />

As such, this function only supports Unicode character codes 0 through 255. For character codes greater<br />

than 255, or when double-byte words are not needed, use the ValueToChar function.<br />

Examples<br />

If Array[0] = 29779, Array[1] = 25717, and Array[2] = 28521, then the returned value is "Studio":<br />

ValueWToChar( "Array", 3 )<br />

If Array[10] = 29779, Array[11] = 25717, and Array[12] = 28521, then the returned value is "Studio":<br />

ValueWToChar( "Array[10]", 3 )<br />

<strong>InduSoft</strong> Web Studio Page 569

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

Saved successfully!

Ooh no, something went wrong!