SuperBASIC is the name Sinclair has given to the programing language which comes with the QL. It is more that just Microsoft BASIC with expansions and it has many significant differences from the BASIC used by the T/S 1500 or even the T/S 2068. First of all, single keystroke command entry has been eliminated in favor of a simplified keyboard. But this change is only the most noticable one.
Another very noticeable change is in the punctuation used. Many times when two words would logically be used in a command, an underscore is used to join these words, into a single word command, but with the appearance and readability of two words. For example, LINE is a graphics command which draws a line in absolute coordinates. To draw the line in relative coordinates, the command is LINE_R. Furthermore the examples make frequent use of this concept in the naming of variables as in READ test_data or PRINT error_count. This effect takes a little getting used to but seems like a good idea and should make for more readable programs.
The biggest change is a more fundamental one. BASIC was designed to be a simple, easy to learn language. As such, it had severe limitations. Since its beginning, expansions have tried to overcome its inflexibilities but at the expense of complications. Now the latest programing enthusiasm is for structured programing as exemplified by many PASCAL programs. Several new commands added to SuperBASIC permit many of the ideas of structured programming. In particular, subroutines and loops can be named and called by these names.
One of these new commands is DEFine PROCedure. (Note that these words are a combination of upper case and lower case. That is not an example of my bad typing. The whole word is the proper command and the upper case part is the acceptable abbreviation.) This command is really much like a subroutine. In fact, the manual recommends that GOSUB not be used; although for compatibility reasons the GOSUB command is available. The DEFine PROCedure is much more flexible. It can even pass parameters just as in FORTRAN. The main advantage of the new way of doing things is that the subroutines can be named so that their functions can be easily recognized. FOR loops are also named and ended with an END FOR statement. (NEXT is used to cause only part of a loop to repeat). A third new command is REPeat which does just that for a group of lines until some condition causes an EXIT.
All these new commands make SuperBASIC harder to learn. Fortunately you do not have to make use of these commands. The old, easy to learn ones are still there for the most part and can be used until the demands for flexibility force you to learn new methods.
SuperBASIC includes most of the functions, procedures, and constructs found in other dialects of BASIC. Many of these functions are superfluous in SuperBASIC but are included for compatibility reasons:
GOTO use IF, REPeat, etc GOSUB use DEFine PROCedure ON .. GOTO use SELect ON .. GOSUB use SELect
Some BASIC commands are included in SuperBASIC and still have a genuine use:
READ DATA RESTORE REMark PEEK POKE LIST NEW RUN STOP CLEAR
Some commands appear not to be present. They can always be obtained by using a more general function. For example, there are no LPRINT or LLIST statements in SuperBASIC but output can be directed to a printer by opening the relevant channel and using PRINT or LIST.
LPRINT use PRINT # LLIST use LIST # VAL not required STR$ not required IN not applicable to 68008 OUT not applicable to 68008
All in all, there are 107 distinct commands or keywords as they are called. Actually, if variants of these keywords or closely related ones, are counted you get quite a few more than 107. The manual divides them up into 28 haphazard and confusing groups. If one tries for fewer and more independent groups, one can divide the keywords into the categories listed in the following table.
Category Number of Keywords ================================== Basic commands 26 INPUT/OUTPUT 22 Math functions 20 Window commands 14 Procedures 12 Graphic commands 9 Clock 4
In summary one can say that SuperBASIC is much more flexible and stucturable than the usual BASIC. Unfortunately (and inevitably) it will be harder to learn. The language is certainly sophisticated enough for serious programming.