ASCII()

The ASCII() operator produces an ASCII character.

Syntax

ASCII ( int-expr )
  1. int-expr is an integer expression, in the range 0-127.

Usage

The ASCII() operator returns the character corresponding to the ASCII code passed as a parameter.

ASCII() is typically used to generate a non-printable character such as newline or escape. You should avoid to use this function for other characters.

For ASCII characters, ASCII() is the logical inverse of the ORD() operator.

The integer parameter passed to ASCII() must be in the range 0 to 127.

This is not a function, but a real operator. ASCII is often used with parentheses ( ASCII(n) ), but they are not needed.

When the argument is zero, ASCII() has a different behavior, according to the context: ASCII(0) only displays the NULL character within the PRINT statement. If you specify ASCII(0) in other contexts, it returns a blank space.

MAIN
  DISPLAY ASCII(65), ASCII(66), ASCII(7)
END MAIN