Programming
101
NetLinx Studio (v2.4 or higher)
Unicode - Character Case Mappings
Converting between upper and lower case is accomplished by using the Unicode.org character
database to determine the mapping between upper case and lower case characters.
Not all Unicode characters have an upper or lower case equivalent; these characters will not be
affected by WC_UPPER_STRING and WC_LOWER_STRING. Only the characters defined by
Unicode.org as having an upper or lower case mapping are affected by these functions.
Unicode - Concatenating String
Unicode strings and WIDECHAR array cannot be concatenated using the same syntax that ASCII
strings use. In NetLinx, string expressions are enclosed in double quotes and can only contain 8-bit
strings. To concatenate Unicode strings and WIDECHAR arrays, you must use the
WC_CONCAT_STRING function:
wcMyString = WC_CONCAT_STRING(_WC('First name'),_WC(' SurName'))
If you attempt to concatenate Unicode strings or WIDECHAR arrays using NetLinx string
expressions, expect data loss.
Unicode - Converting Between WIDECHAR and CHAR
On occasion, you may need to convert a CHAR array to a WIDECHAR array or a WIDECHAR
array to a CHAR array. The CH_TO_WC and WC_TO_CH functions can be used to accomplish
these conversions.
For example:
wcMyString = CH_TO_WC('Any ASCII string')
wcMyString = CH_TO_WC(cMyString)
cMyString = WC_TO_CH(_WC('Any Unicode string'))
cMyString = WC_TO_CH (wcMyString)
When converting from WIDECHAR to CHAR, Unicode characters are converted to '?'.
Any ASCII or extended ASCII characters, i.e. 8-bit characters, contained in the
WIDECHAR array will appear in the CHAR array.
Converting from CHAR to WIDECHAR never results in loss of data.
Unicode - Using FORMAT
The NetLinx Unicode library does not include a Unicode compatible FORMAT function. In
NetLinx, the format function is used to convert numbers to text.
To use FORMAT with Unicode string, use FORMAT to convert the number to a CHAR array and
then use CH_TO_WC and WC_CONCAT_STRING to combine the result with an existing
WIDECHAR array.
The following two syntaxes are functionality equivalent:
For more information on Unicode character conversion, see the Unicode.org
character conversion FAQ.
Содержание NETLINX STUDIO V2.4
Страница 1: ...instruction manual Software NetLinx Studio v2 4 or higher ...
Страница 16: ...NetLinx Studio v2 4 or higher 4 NetLinx Studio v2 4 or higher ...
Страница 32: ...The NetLinx Studio v2 4 Work Area 20 NetLinx Studio v2 4 or higher ...
Страница 44: ...Working With Workspace Files 32 NetLinx Studio v2 4 or higher ...
Страница 88: ...Working With Systems and System Files 76 NetLinx Studio v2 4 or higher ...
Страница 118: ...Programming 106 NetLinx Studio v2 4 or higher ...
Страница 152: ...Working With Online Devices 140 NetLinx Studio v2 4 or higher ...
Страница 199: ...Index 187 NetLinx Studio v2 4 or higher ...