CHR$¶
Function¶
CHR$ performs the inverse of ASC. It returns the single character string specified by the value of N, which may be an expression.
Syntax¶
CHR$(N)
where the result of N is between 0 and 255.
Examples¶
10 DIM A$f10, 10)
20 A$ = CHR$(34):REM (see note below)
30 PRINT "HE SAID, ":A$; "HELLO" ;A$
40 B=7
50 PRINT CHR$(B):REM BEEP
60 PRINT CHR$(1):REM THIS CLEARS THE SCREEN
The above will print:
HE SAID, "HELLO"
then bleep, and then clear the screen.
Remarks¶
The expression must have the value 0 to 255 expression must be enclosed in parentheses.
Note
The character ” cannot be embedded in PRINT strings since it it acts as a delimiter.