A&B Computing


Oxford Pascal

Categories: Review: Software
Author: D. Stiles
Publisher: Oxford Computer Systems
Machine: BBC Model B

 
Published in A&B Computing 2.11

BBC Pascal from the compiler factory of Oxford Computer Systems

Oxford Pascal (Oxford Computer Systems)

BBC Pascal from the compiler factory of Oxford Computer Systems. PASCAL has been extensively advertised recently as the panacea for programmers who are tired of BASIC. As a professional user of PASCAL on IBM machines, I can vouch for the fact that it is more convenient in many ways, and fewer errors are encountered at runtime than with BASIC. I chose the Oxford Computer Systems version of PASCAL for the BBC computer with a view to creating a much needed database for photo graphic slides.

The reasons for the choice of PASCAL over BASIC were twofold; the compiled code would (in theory) run faster on string searches, and PASCAL is more convenient and efficient in handling database records due to the inherent record structure of PASCAL. Whilst the former may or may not be true, the latter fell far short of expectations in this instance.

Postage And Packing

Oxford PASCAL arrived in a plastic 'book', containing the manual, a ROM and a floppy disk. A cassette version is also available, but this is a rather more limited version which requires the ROM to always be present and permits only small programs to be compiled.

The disk version, on the other hand, has a disk-based compiler which allows large programs to be compiled directly onto disk. It also has a linker which allows very large programs to be compiled in separate smaller modules. These are generally tested separately as far as possible, and then linked into one complete working whole. It is also possible to include procedures and functions from previous programs by keeping them separately on disk as library files, then INCLUDE-ing them in the compilation.

A 'locate' facility is provided for either converting compiled code into standalone programs or for placing them at any memory location you may choose. Note the either/or - it's apparently not possible to relocate a program to run without the Oxford PASCAL ROM; thus a program could not be run, for example, on a cassette machine if it had been compiled on a disk-based machine, unless the ROM was in residence.

Documentation

The Oxford manual is adequate if one is familiar with the language: however, it is not suitable as a beginners guide to the PASCAL language. More and better examples would be beneficial, even to the experienced PASCAL user. I would suggest something like Programming In Pascal by Peter Grogono as a tutorial for the tutorial and a reference book for the experienced programmer.

The Oxford manual contains several errors, although most can be puzzled out with a bit of thought. The practice of using the underline character to separate words in a procedure name is supported, says the book. No it's not, says the compiler. The example showing a packed array of fifteen characters being assigned. However, nine characters will not even compile. The provision for simulating BASIC's OSCLI Command Line Interpreter is also shown incorrectly, since it requires a writeln and the string in quotes.

Unlike my normal practice of "try it first, then read the book", I actually read most of the manual before even plugging the ROM in. The first alarming thing I read in the manual was 'BASIC 2', since I only have BASIC 1. And the manual meant it too! I don't know why PASCAL should require BASIC at all, but the resident editor refused to work, and the sample programs, with one exception, refused to compile. The compiler seemed to fail them on real numbers at compile time, but the program then crashed at runtime if the reals were replaced by integers.

The resident editor as supplied I can do without in any case, since it is a line editor similar to the BASIC one; although with the addition of find and replace facilities. As far as I am concerned, one of the big attractions of PASCAL is that I can use a text editor with its facility for scrolling up and down through the program, and get away from the restrictions of a line editor. Even a word processor such as Wordwise is preferable, and this is what I am currently using - on PASCAL. Of course, life is never smooth, and the Oxford PASCAL ROM does not live well with Wordwise. In particular, Wordwise will no longer include a print file from disk in its presence.

Filing Failing

On the whole, these faults are mainly in the category of teething bugs, and seem to indicate too early a release of the product. If these were its only failings I could use it for several programs I have in mind. Indeed, I have written four smallish ones with it already. Its major faults are in not supplying adequate string handling, and providing only the basic file handling necessities.

There is no provision at all for random access files, and this means that my database ideas are just not on, as this type of application uses almost nothing else. A good random access filing system coupled with the record structure inherent in PASCAL makes it a language ideally suited to database management.

The Oxford implementation of PASCAL contains access points to the computer's operating system at several points, giving control over move, draw, sound etc. It does not, however, provide a direct equivalent of INKEY and the only way to check on the shift and control keys is by braving the wrath of Acorn and 'peeking' a memory location. There is no apparent way of defining constants for ASCII characters; allowing CONST chr(130) to define a function key constant would be very useful. Nor is it possible to do a SET on the full range of 0 to 255 for key checking, which in turn is necessary because CASE is lacking the ELSE function. Although non-standard, the ELSE or OTHERWISE option for CASE is almost universal in modern PASCAL implementations.

Now know that string handling, OTHERWISE/ELSE and random access are not defined in the PASCAL standards, but any language which ignores them is doomed at birth for serious programming. Couple this with the fact that the I/O error trapping does not work on disk files and that ends its usefulness for general user-friendly applications. So much for the clause in the manual permitting the user of Oxford PASCAL to sell programs written in it.

After using Oxford Pascal for a week I had compiled a short list of faults and comments. Not being able, for some reason, to raise them on the phone I wrote to Oxford enclosing my list. Apart from one abortive phone call from them which failed to reach me, I heard nothing from them for six weeks. When they did write, it was a brief note enclosed with a new (free) copy of version 2.1 disk and ROM, with a note to the effect that, as far as they knew, all the bugs had been removed, and that a new manual was in preparation.

My copy now seems to work with BASIC 1 quite happily, as evidenced by the fact that I can use the editor (admittedly useful for five-liners), and the sample programs now compile and run; but none of the other complaints seem to have been dealt with.

Oxford Summary

The Oxford implementation of PASCAL is a very good try on a machine with limited memory: although with disk machines this is not quite such a limitation as with cassette ones.

As a strict version of standard PASCAL, the Oxford implementation is very reasonable, except for a few bugs (some of which may still be caused by BASIC I). Thus it is a good introduction to higher level languages for students, providing they have a good teaching manual to aid them. As a serious working language, however, standard PASCAL itself is of little use. It is only when extensions such as disk and string handling are added to the language that it becomes the powerful tool with which real programs are written.

D. Stiles

Other Reviews Of Oxford Pascal For The BBC Model B


Oxford Pascal (Oxford Computer Systems)
A review by John Maher (Beebug)