CHR

The CHR function returns the ASCII character equivalent of a numeric ASCII code value, as a single byte value.

Syntax

CHR( number)

number

The ASCII code value for a character.

Results

This function takes as an argument a numeric value, or any value that can be implicitly converted to numeric, and returns a character. The character returned is described in the following table:

Value of number Returned value
0 - 255 The ASCII character corresponding to the value of number.
> 255 The ASCII character corresponding to the value of number mod 256.
< 0 The ASCII character corresponding to the value 255.
null null

Examples

splice> VALUES( Chr(65) );
1
----
A

splice> VALUES( Chr(321) );
1
----
A

splice> VALUES( Chr(null) );
1
----
NULL