Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

189 CHR$ character string Purpose To generate a character (single letter or number etc) from the number given in string form. The character generated will be the ASCII character at the position given in the ASCII table. See the description of ASC and the full ASCII table in Appendix C. The statement VDU has a similar effect to PRINT CHR$ and may be more useful in some applications. Examples 220 RED$=CHR$(129) 1070 PRINT CHR$(8); makes the cursor move left one position. PRINT CHR$ (7) causes a short note to be emitted by the loudspeaker.

Description A string function whose value is a single character string containing the ASCII character specified by the significant byte of the numeric argument. Thus CHR$(-1) would give ASCII character number 255. Note that the statement VDU is probably more useful when sending characters to the screen, since it involves less typing. CHR$ is needed when you wish to put a special character into a string. Syntax = CHR$ ( ) Associated keywords ASC , STR$ , VAL , VDU