Sinclair QL Beginner's Manual page 51

Hide thumbs Also See for QL:
Table of Contents

Advertisement

The numbers #0, #1 and #2 are called channel numbers. In this particular case they enable you to
direct certain effects to the window of your choice. You will discover later that channel numbers have
many other uses but for the moment note that all of the following statements may have a channel
number. The third column shows the default channel - the one chosen by the system if you do not
specify one.
Note that windows may overlap. If you use a TV screen the system automatically overlaps windows
#1 and #2 so that more character positions per line are available for program listings.
KEYWORD
EFFECT
AT
Character position
BLOCK
Draws block
BORDER
Draw border
CLS
Clear screen
CSIZE
Character size
CURSOR
Position cursor
FLASH
Causes/cancels flashing
INK
Foreground colour
OVER
Effect of printing and graphics
PAN
Moves screen sideways
PAPER
Background colour
RECOL
Changes colour
SCROLL
Moves screen vertically
STRIP
Background for printing
UNDER
Underlines
WINDOW
Changes existing window
LIST
Lists program
DIR
Lists directory
PRINT
Prints characters
INPUT
Takes keyboard input
Statements or direct commands appear in window #0.
For more details about the syntax or use of these keywords see other parts of the manual.
RECTANGLES AND LINES
The program below draws a green rectangle in 256 mode on red paper with a yellow border one pixel
wide. The rectangle has its top left corner at pixel co-ordinates 100,100 (see QL Concepts). Its width
is 80 units across (40 pixels) and its height is 20 units down (20 pixels).
100 REMark Rectangle
110 MODE 256
120 BORDER 1,6
130 PAPER 2 : CLS
140 BLOCK 80,20,100,100,4
You have to be a bit careful in mode 256 because across values range from 0 to 511 even though
there are only 256 pixels. We cannot say that the block produced by the above program is 80 pixels
wide so we say 80 units.
INPUT AND OUTPUT
SuperBASIC has the usual LET, INPUT, READ and DATA statements for input. The PRINT
statement handles most text output in the usual way with the separators:
,
tabulates output
DEFAULT
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#1
#2
#1
#1
#1

Advertisement

Table of Contents
loading

Table of Contents