CHAR Function

The CHAR function returns the character with the given ASCII decimal code.

Format

CHAR(expr)

Parameter(s)

expr

An expression evaluating to a numeric value.

Description

The CHAR function converts a decimal value to its corresponding ASCII character. It is particularly useful to access characters like attribute marks (CHAR(254)) and error bells (CHAR(7)). The CHAR function is commonly used in EQUATE statements.

The SEQ function acts as an inverse for the CHAR function, producing the ASCII value of a given character. See SEQ Function for more information.

See Appendix B: List Of ASCII Codes for ASCII character codes.

Example

To send an error bell to the screen, the code might read:

DISPLAY CHAR(7)

See Also

Statement and Function Reference