Bill on QL Basic

See all articles from SMUG Bytes v6 n2
Author(s): Bill Heberlein
Publication: SMUG Bytes
Pub Details: SMUG Bytes v6 n2 (Volume 6, Issue 2)
Date: February 1989
Pages: 2

Here we are again. QL basic is a strange new subject to the old Sinclair Basic programmer. There are many new instructions and most of the old ones have many new parameters (qualifiers). There is one thing I like and that is the checking of upper and lower case. Instead of IF a$=”y” or a$=”Y” you can use IF a$==”y”. This checks for either upper or lower case. The “y” can be either upper or lower case in the comparison. The CLS instruction is is the opposite idea. Just CLS will clear only the default screen. To clear the any other screen you must use #x where x is the screen (channel number) you wish to clear. For example;

CLS #0 will clear the bottom (command) part of the screen.

CLS #1 will clear the right hand, default, screen in monitor mode or current screen in TV mode.

CLS #2 will clear the left hand screen in monitor mode.

Note the #x is where the channel is assigned. These channels can be closed and reassigned to somewhere else. Note do not close channel 0 or the keyboard will be unusable. You can do it within a program but beware if it is not reopened again the only way to use the keyboard after that is to RESET. Along with this is the listing of a program to the printer. There is no LLIST so you must assign a channel to the printer and then LIST to that channel. For example;

OPEN #3,ser This will open channel 3 to serial port #1. Then LIST #3 will route the list to whatever is connected to SER #1 and when the list is done the channel will close automatically.