There are several subroutines for displaying text on the screen or clearing the screen in Ozapell Basic. A few a explained here.
To display a line of text on the screen and then starting a new line for text, use PRINTLINE.
In this example, the variable TEXT is assigned the string HELLO. The subroutine PRINTLINE uses the variable TEXT. The string contained in TEXT will be displayed on the screen by PRINTLINE.
In order to display a string of text without starting a new line, use PRINT.
As a shortcut, PRINT and PRINTLINE can also be used like this:
In this example, the text string “HELLO” will be copied to the variable TEXT and then PRINTLINE will use it to display. Then the content of the variable X will be copied to TEXT and displayed by PRINT.
To clear the screen, use CLS.
This will clear the screen. The colors on the screen will be changed based on the current settings in TEXTCOLOR and BACKCOLOR.
TEXTCOLOR and BACKCOLOR are variables used by most display subroutines to determine what colors to use.
TEXTCOLOR is the foreground color. BACKCOLOR is the background color.
There are several colors predefined by Ozapell Basic.
The foreground color is set to white while the background color is set to black.