QLink Issue 49 Contents QL Paint


QLink

Pro Fortran-77

I OWE my interest in computers to a schoolboy infatuation with the Fortran programming language, and a stack of batch-processed punched cards.

At school in the early seventies Fortran was the main language for computer illiterates who fancied themselves as hackers and, although it was replaced by interactive Basic operating on remote terminals, it still remains popular in colleges and scientific establishments.

Fortran-77, from Prospero, is a complete implementation of the ANSI X3.9 standard. It has a run-time library and standard Sinclair linker which is used to connect separately compiled Fortran routines.

The two-pass compiler converts source into relocatable binary code. Being relocatable, the machine code can be turned into a job and run anywhere on the user RAM map. Unfortunately, a source editor has not been included so you will need to buy one. I would suggest the one from Metacomco, which is a standard ASCII editor, but you would have to buy one of their languages or utilities to obtain it.

Once you have found a way of entering source the rest is plain sailing. The first input the two-pass compiler requires is the name of your source file - it can take only one file at a time.

The compiled source code is assembled on cartridge using MDV2_ and a report goes to the screen console to inform you of any errors and, if there are none, how much code and data has been assembled. That is useful if you want to run tasks concurrently.

Just because you can compile only one program at a time does not mean that the program cannot be made up of code from different files. Several source files can be linked into one program using the INCLUDE directive which is so popular with C compiler manufacturers. When the compiler encounters INCLUDE the code which it points to is loaded as a routine within the main program and compiled.

There are nine compile-time options which you can select. Those include making a list of source file and error messages and dumping it either to the screen console or MDV_ file, checking the range of variables and compacting code if memory is at a premium.

The compiler is easy to operate and can be made even easier by putting it onto disc and using QL Toolkit, from Sinclair Research, to put the compiler into Batch Mode. Once you've done that a single command can be used in compilation instead of having to invoke the compiler's two passes manually.

Error messages can occur at any time during compilation and consist of a digit from one to four indicating the level of severity, the source line number at which the error occurred and the code of that error.

The error messages are not in English and you will have to refer to an appendix at the back of the manual to translate them. There are 107 error messages covering compile-time, run-time and IO errors.

The comprehensive manual covers most aspects of Fortran but it is no replacement for a book on the language -which any good Websters outlet will stock. Fortran is not as difficult as Pascal to learn, especially if you have done some Basic programming. lt is, after all, a sub-set of Basic with a structure similar to that of Pascal and an extended file-handling capability.

Pro Fortran-77 will appeal to colleges and other educational establishments, and to home users who want a Basic-type language without the restrictions on random access file handling.

It can also be used to construct mathematical models, handle calculus, equations and geometric functions. Those can be supplemented and made more digestible on screen by the sophisticated graphics commands. At the other end of the scale you can, of course, produce your own graphics adventures - which usually require manipulation of locations with graphics - or adventure games which do not need user-defined graphics. At almost £100 you are unlikely to want to just try it out! However, if you've seen what Fortran can do and have long applications programs to write, Pro Fortran-77 is an excellent alternative to all those Basic and Pascal compilers on the market.

Publisher Prospero Software
Price £99.95
*****


QLink Issue 49 Contents QL Paint

Sinclair User
April 1986