296 Example Print position 12345678901234567890 PRINT 1,2 1 2 PRINT 10,200 10 200 PRINT;10;200 10200 PRINT PRINT "Answer";A Answer42 PRINT "Answer"A Answer 42 PRINT "Answer",A Answer 42 PRINT 1/2 0.5 PRINT 1/3 0.333333333 PRINT 3.3'2.25 3.3 2.5 The printer can be turned on at any time by typing CTRL B or by the statement VDU2 in a program. The output of all PRINT statements will then appear on the printer as well as the screen. CTRL C turns the printer output off. See chapter 38 for more information about the printer. Considerable flexibility has been built into the interpreter to enable it to print numbers in several different layouts.
There is no need to learn to use these options at first but they will be invaluable when layout is crucial. A more detailed explanation of the advanced features is given below. It is possible to control the overall field width, the total number of figures printed and the number of decimal places printed. All these features are set with one variable called @ %. In brief, setting @%=131594 will give two decimal places @%=131850 will give three decimal places @%=&90A will return to the normal output format. For a detailed understanding of the format it is best to consider @ % as a four byte number (eg @=&01020903 ), each byte controlling one aspect of the print format.
The most significant byte will be called B4. It has a value of 01 in the example above. The least significant byte is called B1 and has the value 03 in the example above. B4 is tested by the function STR$ to determine the format of strings created by that function. If B4=01 then strings will be formatted paying attention to the setting of @ % otherwise @ % will be ignored by STR$ . Initially B4=00.