40 PRINT '"Jan" ,1234.56,789,123.45,678.9

50 PRINT "Feb",234.5,67 .89,12,3456.78

@% in line 20 is a special variable which controls the printing of numbers. In

this case it is used only to reduce the field width to eight characters. The result

is very untidy and confusing because the numbers are not aligned vertically

about the decimal point. Make line 20:

20 @=&020208

This tells the computer to print each number to two decimal places and with a

field width of eight.

@% offers a great deal of control over the way the computer prints numbers,

and is discussed in more detail in the Reference Manuals. Note that once @% is

set, its effects remain until you reset @%, perform a hard break, or switch the

computer off.

Text and graphics

It is sometimes useful to restrict the printing of text to part of the screen. You

saw an example of this in the Welcome software.

Type:

MODE 135 RETURN

You can set up a text 'window' within which text is displayed by typing:

VDU 28,12,15,30,10 RETURN

Type a few characters at the keyboard (anything will do). The text is printed

inside a window in the middle of the screen.

The VDU 28 command is one of a series ofVDU commands which enable you to

control the way text and graphics are displayed on the screen. VDU commands

can be used to change the colours of text or graphics, move the cursor, clear the

screen, etc. VDU 28 is used specifically to set up a text window.

The first two numbers following the VDU 28 give the position of the bottom left

character within the new text window. The remaining two numbers give the

position of the character at the top right of the text window (see the top

illustration on the next page).

C 24