Graphics using PRINT statements, colour and moving graphics

Judith C. Miller · 1985

Until now we have controlled where the computer is to print a message or number by using the semi-colon, the comma and the TAB statement. We have also learned how to leave spaces in a program and how to start a new line by just using the word PRINT (for example, 50 PRINT). However, we can control the print position much more exactly by using PRINT AT. The word AT is on key I and is obtained by using SYMBOL SHIFT. If you look at diagram 23.1, you will see that the screen is divided into twenty-two rows numbered 0 to 21 down the screen and into thirty-two columns numbered 0 to 31 across the screen. By using these numbers, rows first followed by columns, we can make the computer print anywhere on the screen. For example will print a star almost in the centre of the screen. Notice that the two numbers are separated by a comma and that a semi-colon separates the second number from the rest of the instruction. The program below prints stars at different positions on the screen.

Read the paper · More papers on PaperTik