CHAR Function

Converts a decimal value to the corresponding ASCII or multi-byte character.

Syntax

CHAR(charValue{,charSize})

Syntax elements

charValue An expression that evaluates to an integer value, specifying the decimal value of the required character.

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 character with the code charValue.

Comments

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

If value is greater than 256charSize, it is divided by 256charSize and the remainder is used.

CHAR is the inverse of the SEQ function.

Examples

Assigns the string value of a value mark to variable VM:

VM = CHAR(253)

Assigns the ASCII string value for a subvalue mark to variable SVM:

X = 252
SVM = CHAR(X)