SEQ Function

Converts an ASCII or multi-byte character to its character code.

Syntax

SEQ(char{, charSize})

Syntax elements

char The character to be converted.

charSize Optional. A positive integer in the range 1 to 6, specifying the size of the character (default, 1). This parameter is intended for future use with multi-byte characters.

Return value

The decimal code that corresponds to the character char.

Comments

Reality does not currently support multi-byte characters; however, SEQ may be used for binary to decimal conversions, where charSize is the number of bytes in the binary field.

SEQ is the inverse of the CHAR function.

Examples

Prints the number 73:

PRINT SEQ('I')

Places the decimal equivalents of the characters in string S into vector C:

DIM C(50)
S = 'THE GOOSE FLIES SOUTH'
FOR I=1 TO LEN(S)
C(I) = SEQ(S[I,1])
NEXT I