QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _CONTROLCHR statement can be used to turn OFF control character attributes and allow them to be printed.

Syntax

_CONTROLCHR {OFF ON}

Description

Example(s)

Printing the 255 ASCII characters in SCREEN 0 with 32 colors.


DIM i AS _UNSIGNED _BYTE
WIDTH 40, 25
CLS
_CONTROLCHR OFF
i = 0
DO
 PRINT CHR$(i);
 i = i + 1
 IF (i AND &HF) = 0 THEN PRINT
LOOP WHILE i
LOCATE 1, 20
DO
 COLOR i AND &HF OR (i AND &H80) \ &H8, (i AND &H70) \ &H10
 PRINT CHR$(i);
 i = i + 1
 IF (i AND &HF) = 0 THEN LOCATE 1 + i \ &H10, 20
LOOP WHILE i
END 

See Also