Sinclair QL Beginner's Manual page 81

Hide thumbs Also See for QL:
Table of Contents

Advertisement

You have seen one example of a device, a file of data on a Microdrive. We may say loosely that a file
has been opened but strictly we mean that a device has been associated with a particular channel.
Any further necessary information has also been provided. Certain devices have channels
permanently associated with them by the system:
You can create a window of any size anywhere on the screen. The device name for a window is:
scr
and the appended information is, for example:
The following program creates a window with the channel number 5 and fills it with green (code 4)
and then closes it:
100 REMark Create a window
110 OPEN #5, scr_400x200a20x50
120 PAPER #5,4 : CLS #5
130 CLOSE #5
Notice that each window can have its own features such as paper ink, etc. The fact that a window has
been opened does not mean that it is the current default window.
You can change the position or shape of an opened window without closing it and reopening it. Try
adding two lines to the previous program:
124 WINDOW #5,300,100,110,65
126 PAPER #5,2 : CLS #5
Re-run the program and you will find a red window within the original green one. This red window is
now the one associated with channel 5, see figure.
BORDER
You can place a border round the edge of the screen or a window. For example:
BORDER #5,6
would create a border round the channel #5 window. It would be 6 units thick and the size of the
window would be correspondingly reduced. The border would be transparent, protecting anything that
was under it. You can specify a coloured border by the usual method.
BORDER #5,6,2
Channel
OUTPUT – command
#0
window
INPUT – keyboard
#1
OUTPUT – print window
#2
LIST – list output
Use

Advertisement

Table of Contents
loading

Table of Contents