Classic Computer Magazine Archive ST-Log ISSUE 34 / JULY 1989 / PAGE 84

REVIEW

Prospero Pascal

Prospero Software
100 Commercial Street
Suite 306
Portland, Maine 04101
(207) 874-0382
$149.00

Reviewed by David Plotkin

Prospero Pascal is a full-featured Pascal that includes everything you need to begin writing stand-alone programs for your Atari ST.

Pascal is the language of choice for many programmers of the Atari ST, as well as many other computers. Pascal is a structured language that makes it easier to follow program logic and avoid the pitfalls of "spaghetti coding." The results of a Pascal program are compiled to machine language, and can thus run quickly, as well as be marketed commercially or handed out to people who don't own a copy of the language.

Prospero Pascal is a full-featured Pascal that includes everything you need to begin writing stand-alone programs for your Atari ST. In addition to the language and associated libraries, Pro Pascal includes a symbolic debugger, cross-reference variable generator and "library manager" to help programmers who wish to maintain their own libraries.

Working on the workbench

Pro Pascal is operated from a shell known as the "workbench." Fully menu-driven, the workbench gives you access to a full-function editor with many advanced capabilities, the compiler and linker. You may also run a program straight from the workbench, so you can test the results of your programs without exiting Pro Pascal. Quite a variety of configuration options can be specified and saved to disk for future sessions.

The editor can load a .PAS file (or any other file, for that matter) and runs in a window with scroll bars, arrows and the usual GEM controls. The full features of the editor make it a straightforward task to edit your file. You can specify blocks of text using the mouse (full click-and-drag), and once you have done that, you can cut, copy, paste, delete or write the block to disk. You can also load a block from disk, giving the capability for merging different program fragments. The editor supports find and replace (both forward and backward), auto-indenting loops and decision statements, and can instantly jump to any line number. Even the common WordStar command keys for moving the cursor are supported. Finally, the function keys can be defined to produce just about any string you desire, giving you full macro capabilities.

The compiler converts the Pascal source code to relocatable machine language. It is fast, yielding compilation times comparable to OSS/ICD's Personal Pascal compiler. One of the things that makes the compiler so flexible is the ability to specify the drive and path from which include files, work files and libraries will be read from or written to. The compiler has a separate option to do a syntax check on the source code that is handy and much faster than attempting to do a complete compile, only to find many syntax errors. Many compiler options allow you to customize what you want the compiler to do. Checking (arrays, assignments and pointers) is recommended during program development, these can be turned off for the final compile to produce faster code. Double precision can be used for real numbers, and you can ask for shorter (but slower) code generation.

The linker links the machine language output from the compiler with the files necessary for the program to run. The workbench offers the option of linking with files necessary for running under GEMDOS and GEM (VDI and AES), as well as any other files you desire. The linker can be used with a control file that lists the names of all files that are to be linked, which provides quite a bit of flexibility.

Also included with the workbench is PROBE, the symbolic debugger. This advanced program tests a program and can be invaluable in finding errors. The output of PROBE can be routed to a file, the printer or an alternate screen. A cross-reference generator that compiles a list of all variables (called "source identifiers" in the Pro Pascal documentation) is available. It can even list the variables in any included files and show what line these variables are used on.

The language

Pro Pascal is a complete Pascal, meeting not only the ANSI standards, but also containing many of the "normal" extensions users have come to expect. Full variable typing, including integer, real, char, Boolean, enumerated, subrange, array, record, set, pointer and files are all supported: The files can be either text or nontext, and random-access files are also available. Procedures and functions, with both variable and value parameters are provided, as is CASE, REPEAT, WHILE, FOR, WITH and IF. The standard set of math functions, commands to input and output text, string handling, Boolean (AND, OR, XOR), set operations and bit/byte manipulation are all built into Pro Pascal. Even in-line assembly code is supported.

As with any other version of Pascal, all variables have to be declared, but there is no limit on the number of times the CONST or VAR declarative headers can be used. Segment compiling is supported; that is, procedures and functions can be grouped into a segment or module and compiled separately. By then including the compiled code in the final product (using the EXTERNAL directive), you are freed from having to recompile the (assumed to be) error-free sections of your program over and over, thus saving time and increasing the ease of debugging because the program in the editor will be shorter, since it need not include the segment-compiled portions.

Full array support includes the Pascal extension to denote an array as either "ARRAY[t1] of ARRAY[t2] of t" or "ARRAY[t1, t2] of t," making it conform to the more "normal" notation of arrays. Record types include variant tag fields. String manipulation functions include CONCAT, COPY, INSERT, LENGTH, DELETE, STR and POS, making string handling a powerful part of this language. File-handling command extensions include assigning a file to a device (handy for printing), variable buffer sizing, RAMdisk support, appending to a file, updating (both read and write access) and full random-access text and nontext files.

Pro Pascal also contains commands supporting GEMDOS's ability to allow one executing program to invoke another, complete with message passing and return codes. Although these advanced concepts will not be of use to the majority of programmers, they permit the developer to include powerful capabilities in their Pro Pascal programs. Finally, Pro Pascal has extensions for hyperbolic trig functions, Peek, Poke, address of variables, a prompt function, date and time.

A real GEM

Pro Pascal includes a full range of support for both VDI and AES, in the form of external procedures that match, almost exactly, the format of VDI and AES calls in C. This similarity makes it possible for someone who is just learning how the GEM functions work to make use of the large amount of information available about the C GEM calls. In your Pascal program, you must include the file that declares the special Pascal parameters and arrays, then link the file that contains the external procedures themselves. Virtually every VDI and AES function is included, including all graphics, menus, dialog boxes, windows and events. Each function is accompanied by a complete explanation of how it works, example programs and a declaration of the external procedure or function.

Manual labor

The three manuals that accompany Pro Pascal are high-quality and spiral-bound to allow them to lie flat. They are not designed to teach programming in Pascal, but are excellent reference guides. The first manual is on the language and the workbench (editor, compiler, linker) and includes a full description of the extensions to the language. The two additional manuals, describing the VDI and AES extensions, are complete, and little additional information on GEM should be needed beyond what is supplied.

Comparisons

Inevitably, comparisons will be drawn between Pro Pascal and the giant of the ST Pascal world, Personal Pascal from OSS/ICD. Both of these languages are excellent implementations of Pascal, but they are quite different, especially in how they handle GEM. Pro Pascal uses the straight "generic" VDI and AES bindings, while Personal Pascal has its own functions that combine some of the more tedious GEM bindings into more powerful (and easier to use) commands. Personal Pascal allows you to build your own Dialog boxes and menus right in the program. It also automates much of the handling of windows and gives excellent descriptions and sample programs showing how to use these custom commands.

One thing that bears considering is that Pro Pascal is being updated and actively supported by Prospero, while Personal Pascal has languished, with no strong marketing force to keep it viable. Further, although many of the GEM aspects of Personal Pascal are easier to use, they are different from the rest of the ST world, while Pro Pascal has pretty much adhered to the standard.

Conclusion

Prospero Pascal is a complete, high-quality language with superb manuals. The wealth of commands, VDI and AES bindings, a quality editor and the many options and extensions make it an excellent value, and it is highly recommended to the budding (or experienced) Pascal programmer.

David Plotkin has been pounding the keys on Atari computers for almost ten years, and in that time he has written many memorable programs and articles. He has an MS in chemical engineering and is a data analyst for Chevron Corporation.