The Fortran STOP and PAUSE statements

In this section:

You may wish to trap the STOP or PAUSE Fortran statements for your own additional processing. These standard Fortran routines call upon other routines named STOP@ and PAUSE@ respectively and the user may provide alternative definitions for these routines to over-ride the system defaults.

In order to do this you should provide your own STOP@ subroutine with the following specification:


When you have completed your 'clean up' operation in STOP@ you should call on the system routine EXIT@1 as the last instruction within STOP@ to allow ClearWin+ to 'clean up' before termination (EXIT@1 has no arguments and does not return to the calling routine).


Similarly, you may also provide your own version of the PAUSE@ routine with the specification:


The default PAUSE@ message action uses the MessageBox function to put up a MODAL dialog box captioned 'Pause' with a STOP icon, a single OK button and the pause message which is a argument in the standard PAUSE routine. This default action may be modified if the user writes his own PAUSE@ routine. No call-on (like the call to EXIT@1 above) is necessary or possible.

A routine called ABORT@ is available for use when the program needs to terminate because of an error condition.



Copyright © 1999-2022 Silverfrost Limited