char() Function

The char() function converts a number between 0 and 255 to its corresponding ASCII character equivalent.

Syntax

char(num.exp)

Parameter(s)

num.exp

Number between 0 and 255 to be converted to the corresponding ASCII character equivalent. Numbers over 255 are adjusted into the range 0 to 255 by taking the number modulo 256.

Description

NOTE

The arguments in the char() function must be numeric otherwise the [b16] run-time warning message displays.

Example(s)

This causes the terminal to beep once.

crt char(7)

This concatenates an escape with a k and assigns it to string.

string = char(27):"k"

This creates a constant at compile time to reference attribute marks.

equ am to char(254)

See Also

crt Statement

BASIC Functions

Numeric Expressions

print Statement

rem() Function

seq() Function

Statements and Functions