Modula-2 Reloaded

A Modern Typesafe & Literate Programming Notation

Site Menu

Project

Specification

Implementation

Recommendations

Reference

Needs Updating

Work in Progress

Wastebasket

Wiki Manual

edit SideBar

Termination Handling Library

WiP.TerminationHandlingLibrary History

Hide minor edits - Show changes to markup

2010-04-22 14:16 by benjk -
Changed lines 10-12 from:

(* Pushes a new termination handler onto the termination handler stack.

   Each module that requires termination should call this procedure during module initialisation. *)
to:

(* 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. *)
Changed lines 16-17 from:
   This procedure is automatically installed as the runtime system's termination handler. *)
to:
   This procedure is automatically installed as the program's termination 
   handler in the runtime system. *)
2010-04-22 13:25 by benjk -
Added line 4:
2010-04-22 12:40 by benjk -
Changed line 13 from:

(* Removes and calls each handler on the termination handler stack.

to:

(* Removes and calls each termination handler on the termination handler stack.

2010-04-22 12:37 by benjk -
Changed line 8 from:

PROCEDURE addHandler ( handler : Handler );

to:

PROCEDURE Install Handler? ( handler : Handler );

Changed lines 12-18 from:

PROCEDURE lastHandler : Handler; (* Removes the topmost handler from the termination handler stack. *)

PROCEDURE handlerCount : LONGCARD; (* Returns the number of handlers on the termination handler stack. *)

PROCEDURE windDown;

to:

PROCEDURE Wind Down?;

Deleted line 14:
2010-04-16 17:14 by benjk -
Changed lines 1-2 from:

DEFINITION MODULE Termination;

to:

[@DEFINITION MODULE Termination;

Changed line 23 from:

END Termination.

to:

END Termination.@]

2010-04-16 17:14 by benjk -
Added lines 1-23:

DEFINITION MODULE Termination;

(* Termination handling library *)

TYPE Handler = PROCEDURE;

PROCEDURE addHandler ( handler : Handler ); (* Pushes a new termination handler onto the termination handler stack.

   Each module that requires termination should call this procedure during module initialisation. *)

PROCEDURE lastHandler : Handler; (* Removes the topmost handler from the termination handler stack. *)

PROCEDURE handlerCount : LONGCARD; (* Returns the number of handlers on the termination handler stack. *)

PROCEDURE windDown; (* Removes and calls each handler on the termination handler stack.

   This procedure is automatically installed as the runtime system's termination handler. *)

END Termination.