|★ APPLICATIONS ★ PROGRAMMATION ★ MINI PILOT ★|
|Mini Pilot|Computing With the Amstrad)||Applications Programmation|
IF ever a program could be described as of mixed parentage, our version of Pilot can. The form books would describe it as "Pilot, out of N. Dealey, via Chuck Carpenter, adapted by Gordon Mills for the Apple and BBC Micro and translated for the Amstrad by the A Team".
It is rather surprising that no version of Pilot seems to be available for the Amstrad CPC464 despite the fact that the Pilot language was originally written for teachers to help them produce computer-aided learning programs.
Perhaps one reason for this is that the "Super" Pilot such as that available on the Apple is even more complicated to learn than Basic.
One advantage of a simple Pilot is that beginners in programming can be more easily initiated into the techniques of simple program structures. The disadvantages are that it does not allow subroutines/ procedures nor any form of mathematical calculation.
T: Text line.
The version described here is based on the Apple version (lines 500-4900 are almost identical). It requires only a few simple command letters with each command followed by a colon as shown in Table I.
After typing in Program II this should be saved. On running the program, to write a new one press 1 (new program). Then enter the name which you wish to give it. After a few seconds, a zero followed by a question mark will appear.
This is your cue to start typing in Pilot. It is important not to put in unnecessary spaces and to ensure all letters are capitals.
The text command T: can be used to put any normal keyboard character on screen. Crude graphics can fce displayed by using *, + and a full-stop to build patterns spread over a number of lines.
All the main commands can be modified by Y or N immediately following the command symbols and before the colon. This causes the command to operate only if:
The modifier is Y and the iast Match is positive.
The modifier is N and the last Match is negative.
Additional symbols used are * to precede labels of lines to which the programmer wishes to jump and $ to precede string labels in lines accepting user input - these can be used later in the program in text lines. There has to be a space between the colon : and the $ of the label.
Examples of their use are given in Program I or Program la and in the instructions contained within Program II.
When using the Match command more than one string can be checked providing each is separated by a comma. Note also that the last symbol on a Match line must always be a single quote (').
As there is a limitation of 33 characters per line, if the number of matches to be checked is greater than can be accommodated on one line, then the continuation Match lines must start with MN: as shown in line 6 of Program 1.
Apart from improving the integrity and structure of the Carpenter program, additional features include:
When writing or editing a program, to tell the micro that you have finished type DONE on the next line (without a colon) and you will be returned to the menu. Don't forget that you will need the command E: to end the program you are writing.
Question 1 allows one attempt only. Question 2 shows how a multiple choice question can be written.
Questions 3 and 4 allow the user any number of attempts but it is important to include, as in Question 4, the option (?) to escape from what would be an endless loop if the answer is not automatical!/ given after the user response.
Question 5 shows how to obtain two answers from one question. This involves a much more complex structure than the previous questions. The five types of questions demonstrated in Program I can serve as a model for similar questions in any discipline.
If you find Program I corrplex try Program la. This has onl/ three questions and contains only one jump.
This Mini Pilot interpreter, although written in Basic, is surprisingly fast.
The only delays - of several seconds - occur on initialising and when inserting blank lines or deleting lines (under EDIT).
Also, the modular construction allows the expert programmer to readily experiment with additional commands if desired.
Now is your chance to experiment with a simplified Pilot. It may be that more elaborate versions are on the way. but this is a cheap method of finding out whether you think a more expensive Pilot with graphics and mathematical facilities could be a worthwhile acquisition.
I hope you and your friends - or pupils - don't groan too much at the riddles in Program I.