30 PRINT TAB(5);"An";TAB(10) ;"example";TAB(15) ;"of";TAB(20);"TAB."
gives:
0123456789
An example
of TAB.
The computer is already at character position 17 when it comes to the TAB(15)
command, and so it starts a new line.
By also giving the line number, you can use PRINT TAB to place text
anywhere on the screen, for example:
10 MODE 135
20 PRINT TAB(8,24) "It can go at the bottom"
30 PRINT TAB(14,0) "Or the top"
40 PRINT TAB(1,11) "Or the Left" ;TAB(27) ;"Or the right"
Line 30 should remind you that although mode 135 has 25 lines these are
numbered from 0 to 24. Line 40 shows that once you are on a line you can use
TAB as before without referring to the line number.
Printing text in colour
The computer lets you change the colours used in printing text with the
COLOUR command. Type:
MODE 129
COLOUR 1
The number after COLOUR indicates red in mode 129, and tells the computer
that the new text foreground colour is to be red. Anything you type from now
on will be printed in red. Type:
COLOUR 2
COLOUR 129
The first COLOUR command changes the text colour to yellow, and the second
changes the background colour to red. All text from now on will be printed as
yellow on red. You can change the entire screen to the new background colour
by typing:
CLS
The COLOUR commands apply in all modes except modes 7 and 135. As with
GCOL, the numbers used to indicate a particular colour vary from mode to
mode. Consult Appendix I for a full list of the numeric colour references for
each mode.
C 22