|string||A string of one or more characters, enclosed in quotation marks.|
$ZISWIDE is a boolean function used to check whether a string contains any 16-bit wide character values. It returns one of the following values:
|0||All characters have ASCII values 255 or less (8-bit characters). A null string ("") also returns 0.|
|1||One or more characters have an ASCII value greater than 255 (wide characters).|
$ZISWIDE checks the character values to determine if they are in the ASCII range (0-255), and thus could be represented by 8 bits, or in the wide character range (256-65535) and thus use all 16 bits of the Unicode character.
In the following example, the first two commands test strings that contain all narrow (8-bit) character values and return 0. The third command tests a string containing a wide character value (the second character), and therefore, returns 1:
WRITE $ZISWIDE("abcd"),"," WRITE $ZISWIDE($CHAR(71,83,77)),"," WRITE $ZISWIDE($CHAR(71,300,77))
This example returns 0,0,1.