Sinclair QL Beginner's Manual page 75

Hide thumbs Also See for QL:
Table of Contents

Advertisement

CHAPTER 12 – SCREEN OUTPUT
SuperBASIC has so extended the scope and variety of facilities for screen presentation that we
describe the features in two sections: Simple Printing and Screen.
The first section describes the output of ordinary text. Here we explain the minimal well established
methods of displaying messages, text, or numerical output. Even in this mundane section there is
innovation in the concept of the 'intelligent' space an example of combining ease of use with very
useful effects.
The second section is much bigger because it has a great deal to say. The wide range of features
actually makes things easier For example, you can draw a circle by simply writing the word CIRCLE
followed by a few details to define such things as its position and size. Many other systems require
you to understand some geometry and trigonometry in order to do what is, in concept, simple.
Each keyword has been carefully chosen to reflect the effect it causes. WINDOW defines an area of
the screen: BORDER puts a border round it; PAPER defines the background colour; INK determines
the colour of what you put on the paper.
If you work through this chapter and get a little practice you will easily remember which keyword
causes which effect. You will add that extra quality to your programming fairly easily. With experience
you may see why computer graphics is becoming a new art form.
SIMPLE PRINTING
The keyword PRINT can be followed by a sequence of print items. A print item may be any of:
text such as: "This is text"
variables such as : num, word$
expressions such as : 3 * num, day$ & week$
Print items may be mixed in any print statement but there must be one or more print separators
between each pair. Print separators may be any of:
;
No effect - it just separates print items.
!
Normally inserts a space between output items. If an item will not fit on the current line it behaves
as a new line symbol. If the item is at the start of line a space is not generated.
,
A tabulator causes the output to be tabulated in columns of 8 characters
\
A new line symbol will force a new line.
TO Allows tabbing.
The numbers 1,2,3 are legitimate print items and are convenient for illustrating the effects
of print separators
Statement
100 PRINT 1,2,3
100 print 1 ! 2 ! 3 !
100 PRINT 1 \ 2 \ 3
Effect
1
2
1 2 3
1
2
3
3

Advertisement

Table of Contents
loading

Table of Contents