Returns the character code for the first character of each element in a dynamic array.
function takes a dynamic array of characters and returns a dynamic array containing the corresponding numeric code for the first character in each element. If an element consists of a string of more than one character, UNISEQS
returns the numeric value of the first character of that element. If an element is missing or contains the null string, UNISEQS
returns -1 for that element.
If the first character of a dynamic array element is one of the following dynamic array level delimiters: CHAR(252), CHAR(253), or CHAR(254), UNISEQS
treats this character as a level delimiter, and returns -1 for the null element(s) established by parsing this character as a level delimiter.
are functionally identical. On Unicode systems both can be used to return character codes for 16-bit Unicode characters. On 8-bit systems, these functions return that character code of the first 8 bits of a 16-bit Unicode character.
function is the inverse of UNISEQS
. It takes a dynamic array of numeric codes and returns the corresponding characters.
function (or SEQ
function) takes the first character of a string and returns the corresponding numeric code.
function returns the numeric value for the first character of each element as a dynamic array element. The corresponding ObjectScript $ASCII
function can take a string of characters and return the numeric value for a specific character by specifying its position in the string.
The following example uses the UNISEQS
function to return the numeric codes associated with each character in a dynamic array:
! returns 65ý66ý67ý68
The following example returns the numeric codes associated with four lowercase Russian letters in a dynamic array. On a Unicode system, it returns the Russian character codes. On an 8-bit system, characters beyond 255 are treated as null strings, so UNISEQS
returns -1 for each element.
© 1997-2019 InterSystems Corporation, Cambridge, MA