From Modula-2 Reloaded

WiP: Termination Handling Library

DEFINITION MODULE Termination;

(* Termination handling library *)


TYPE Handler = PROCEDURE;


PROCEDURE InstallHandler ( handler : Handler );
(* Installs <handler> as a termination handler at the top of the termination
   handler stack. Each module that requires termination should install its own
   handler during module initialisation. *)

PROCEDURE WindDown;
(* Removes and calls each termination handler on the termination handler stack.
   This procedure is automatically installed as the program's termination 
   handler in the runtime system. *)

END Termination.
Retrieved from http://modula-2.net/m2r10/pmwiki.php?n=WiP.TerminationHandlingLibrary
Page last modified on 2010-04-22 14:16