CHR$ -Function--Character								CHR$

Format
CHR$(character-code)

Type
String

Cross Reference
ASC

Description
The CHR$ function returns the character corresponding to the ASCII character code specified by the value of the character-code.

CHR$ is the inverse of the ASC function.

Character-code is a numeric-expression with a value from 0 to 32767 inclusive, specifying the number of the character you wish to use. If the value of character-code is greater than 255, it is repeatedly reduced by 256 until it is less than 256. If the value of the character-code is not an integer, it is rounded to the nearest integer.

Examples

100 PRINT CHR$(72)
Prints H.

100 X$=CHR$(33)
Sets X$ equal to !.

Program for a complete listing of all ASCII characters and their corresponding ASCII values, run the following program.

100 CALL CLEAR
110 IMAGE ### ## ### ##
120 FOR A=32 TO 127
130 PRINT USING 110:A,CHR$(A);
140 NEXT A