Letter about converting Microsoft BASIC programs to SuperBasic

GALE HENSLEE
[address omitted]
[phone number omitted]
October 19, 1988

Mr. Bill Jones
UP-DATE MAGAZINE
1317 Stratford Ave.
Panama City, FL 32404

Dear Bill,

The July August issue of Time Designs Magazine contains a review of PC-IMPORT, in which Michael E. Carver describes a recent package designed to import IBM or Microsoft BASIC Programs to the QL. The problem is that, while PC-IMPORT does convert some of the BASIC commands to SuperBASIC, the crossover list is quite limited. Of course, many of the commands will transfer perfectly without any syntax changes, too. However, I have downloaded several IBM compatible BASIC programs to the QL, (I don’t have PC-IMPORT) and there are almost always a lot of “Mistake” (as flagged by SuperBASIC) lines to correct. It sounds like PC-IMPORT will correct only a few of them. PC-IMPORT adds several other capabilities and I’m sure it would be a welcome addition to my toolkit.

The enclosed listing contains three SuperBASIC FUNCTIONS to merge with IBM BASIC files that eliminate the need to translate the MID$, LEFT$, and RIGHT$ commands. They accept the same procedure name and arguments as the IBM program. It would be useful with PC-IMPORT, – but if you have a modem and a download program, you can still put these to good use. The first few lines simply illustrate how they are used in a program.

The SAVIT PROCedure is a one liner that I almost always add to programs under development. It replaces the whole routine of deleting and resaving your program each time you make a backup. It also ensures that you don’t misspell the name, a frequent source of errors, at least for me. Of course, the name could be changed to “S” for a single character backup, but I can remember SAVIT.

Sincerely,
Gale Henslee

IBMtoQL_bas page

100 n$="Pennsylvania and Texas"
150 PRINT n$
200 PRINT RIGHT$(n$,5);MID$(n$,13,5);LEFT$(n$,12)
11000 DEFine PROCedure savit:DELETE mdv1_IBMtoQL_bas:SAVE mdv1_IBMtoQL_bas:END DEFine
12000 DEFine FuNction LEFT$(NAME$,LL)
12010 ANS$=NAME$(1 TO LL)
12020 RETurn ANS$
12030 END DEFine
12040 DEFine FuNction RIGHT$(NAME$,LL)
12050 START=LEN(NAME$)-LL+1
12060 IF START=0 THEN RETurn ANS$=""
12070 ANS$=NAME$(START TO LEN(NAME$))
12080 RETurn ANS$
12090 END DEFine
12100 DEFine FuNction MID$(NAME$,ST,LL)
12110 ANS$=NAME$(ST TO ST+LL-1)
12120 RETurn ANS$
12130 END DEFine

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.