Previous: Converting Modules into Units
Up: Creating a Monoprogram Dialog
with Turbo Pascal
Next: Setup for Ports
Previous Page: Units Belonging to Modules
Next Page: Making and Using the Overlays
For monoprogram form, the attract must be converted into the main program of the entire dialogue, from which the modules are called as procedures. It must take care of at least:
The format of the program is:
USES Overlay, AttrXtra, MarkJump, ..., Ports, PDisplay,...;
BEGIN
WhichModule := 0;
REPEAT
MarkFilesOpen( dgTargetMark[1] ); {Make a note of the DOS
file handles that are open just before a module starts. }
ReturnCode := SetJmp( dgTargetMark[1]); {
IF LENGTH(NextModuleNamed) = 0 THEN
UNTIL WhichModule > LastModule;
END;