MODULA-2: DEVELOPERS VERSION
More features more power
TDl's Modula-2 Developers Version is a significant improvement over its Modula-2/ST (reviewed in Antic, May 1986). The two-disk package now contains high-level functions, a new GEM desktop for linking the various parts of the programs, a debugger, an optimizer, a resource construction kit and improved documentation. It even shows you how to make desktop accessories.
Is it better than C? If you think C stands for Cryptic or Complicated, then Modula-2 is the way to go. But if you think Pascal is rigid, then Modula-2 is even more so.
Modula-2 has several advantages over Pascal. Specially-designed functions let you change one type of variable into another. For instance, INTEGER(i) changes (i) to an integer and CARDINAL(i) changes (i) to a cardinal number. You can also perform multitasking operations and use machine language and low-level functions inside Modula-2.
Modula-2 uses definition and implementation modules. The definition module, usually written first, consists of the variables and procedures to be accessed from the implementation module. This information is exported, and other modules can import it when necessary. Definition modules are easily written since few of the details about how the procedures work need to be considered. When the definition module is compiled, the Modula-2 compiler ensures that any module importing a procedure follows the rules set up by the definition module, and any deviation from this is flagged as an error.
TDI has doubled the size of the Modula-2 manual. A large introduction explains a lengthy program that shows off the ST's graphics capabilities. The appendix also has a listing of the procedures that make up GEM, AES and the standard libraries of Modula-2. An index shows where all the procedures can be found. The listing of the procedures now tells what the parameters mean and how to vary them to get the desired effect. While it's not as complete as the documentation for the Atari C Developers Kit, it is quite good.
NEW PROCEDURES
There is also a series of new high-level procedures combining several GEM or AES procedures. For example, you can make a menu in one step rather than using the Resource development kit. There are even the makings of a turtle language in the low-level commands.
The third new feature is the Modula-2 GEM desktop that shortens the edit-compile-link steps and has icons for an editor, a linker, a compiler, a debugger and a trash can. The editor generates files ending in .MOD, and the compiler's output ends in .LNK. The linker's output is .PRG files to be run. Definition files end in .DEF, and once compiled they end in .SYM.
Using the desktop is easy If you have an icon called WORD in the edit column, clicking on it invokes the editor and brings that file into memory. When you come back to the desktop, the WORD icon in the link column will be shaded, signifying that modifications have been made. Clicking on WORD loads the compiler and generates a new link file. You do not need to select the file to be linked. Now the .PRG file will be shaded, signifying a change in the link file. Clicking here invokes the linker and generates a new program which can now be run.
To use the desktop, an accessory shows the paths to be searched for the necessary parts of the program. Thus two floppy drives or a hard disk are easily supported.
Another new portion of the Developers Version is the MegaMax Resource Developer similar to the one in the Atari Developers Kit. It uses pull-down menus and lets you bring items to the proper spot with the mouse. You can produce menus, alerts and dialogs with the development kit. It also lets you create your own icons and use them in your program.
The resource developer is full-scale and doesn't seem to have any bugs. The code it produces is compatible with the Atari Developers Kit and it also produces files which can be included in your Modula-2 program. Another program in the kit takes a compiled resource (a file ending in .RSC) and translates it into Modula-2. It writes the proper object file structures and loads the resource into the object tree. These programs are included only in the TDI Developers Version.
The optimization procedure links only procedures used in the various import files. The accessory included in the Developers Version has several options that can be turned on for use with the debugging operation. One option is that the code for the linking step can be optimized, reducing it by about 40 percent but increasing the link time by about 10 percent.
FULL DEBUGGER
The best part of the program is the full post-mortem debugger. If a runtime error occurs, a complete dump of memory is automatically saved. This is most useful if you have a hard disk, since the dumps can be over 300K of information. After this, you can go into the debugger window and find the source of the problem.
Four windows are available for looking at your program in the debugger. The process window shows the activated procedures at the moment of error, highlighting the exact procedure. The data window shows the values of the variables when the error occurred. The text window shows the source code of the separate module where the the error happened. Finally, you can scroll through memory to see the exact dump at the error.
To help with debugging, TDI has modified the HALT command by making it a runtime error. When the program sees a HALT, the error procedures are invoked and you can fall out of the program.
To further aid in the use of the debugger, there is a decompiler of the .SYM files. There is even a 68000 disassembler included so that the exact action of the compilers can be seen.
The Developers version of the Modula-2 has many features to recommend it. It completely supports GEM and AES. It comes with a resource development kit which can embed the resource directly into the program. The manual has been improved. Macros have been written to simplify using AES. The edit-compile-link step has also been simplified through the use of a Modula desktop. The disks are not copy protected and are easily transferred to a hard disk. The language is almost entirely compatible with Pascal, so it is easy to learn. All in all, this is quite a tool for the Atari 520ST programmer.
MODULA-2, DEVELOPER'S VERSION
TDI Software Inc.
10410 Markison Road
Dallas, TX 75238
(214) 340-4942
$149.95
CIRClE 261 ON READER SERVICE CARD