Programming
103
NetLinx Studio (v2.4 or higher)
Right-to-Left Unicode Strings
Right-to-Left Unicode languages are stored in memory the same way left-to-right language are.
The first memory position of an array contains the first logical character. You can access the right-
most character of a Right-to-Left Unicode string using this notation:
wchChar = wcString[1]
Right-to-left languages are not stored differently than left-to-right languages, they are simply
rendered differently than right to left languages.
However, note that the functions WC_LEFT_STRING and WC_RIGHT_STRING remove a
number of characters from the start and end of a string respectively. Using WC_LEFT_STRING on
a right-to-left language will return the number of right-most, i.e. first, characters you requested, not
the left-most, i.e. end, characters.
WC_LEFT_STRING returns the number of characters request from the front of the string and
WC_RIGHT_STRING return the number of characters requested from the end of the string,
regardless of the language's orientation.
Unicode - Compiler Errors
The most common type of compiler errors you will encounter while programming for Unicode are
caused by not wrapping Unicode string literals in _WC, passing a WIDECHAR to a function that
take a CHAR array or passing a CHAR array to a function that takes a WIDECHAR array.
If you forget to wrap a Unicode string in _WC, expect to see the following compiler error:
On the line where the string is defined:
C10571: Converting type [string] to [WIDECHAR]
On the line where the constant or variable is used:
C10585: Dimension mismatch: [1] vs. [0] and C10533: Illegal assignment
statement
If you try to pass a CHAR array to a function that expects a WIDECHAR array, expect to
see the following compiler error:
On the line where the function call is made:
C10585: Dimension mismatch: [1] vs. [0] and Type mismatch in call for
parameter [WCDATA]
If you try to pass a WIDECHAR array to a function that expects a CHAR array, expect to
see the following compiler error:
On the line where the function call is made:
C10585: Dimension mismatch: [1] vs. [0] and Type mismatch in call for
parameter [A]
Parameter names might not match those listed above.
Содержание 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 ...