CHR$()

CHR$(N)

RETURNS THE CHARACTER CORRESPONDING TO THE ASCII CODE N

  • Type: Function
  • Parameter: 1
  • Group: Strings

ACTION

The function CHR$(N) returns the string corresponding to the ASCII code in the expression N.

N must be between 0 and 255.

Remark 1: CHR$(N) performs the inverse fonction of ASC(S).

Remark 2: the keyword CHR$ ends by '$' : it means that the returned value is a string.

SYNTAX: Result$=CHR$(N)

  • N = expression containing an ASCII code from 0 to 255.
  • Result$ is a string.

USE

  • The function CHR$() is used to know the character corresponding to an ASCII code.

ERROR

  • If N is not a correct expression.
  • If N is less than 0 or greater than 255.

EXAMPLE

print chr$(65)

print "A"

SEE ALSO

ASC()