gm2-libs-coroutines/Debug
DEFINITION MODULE Debug ;
(*
Description: provides some simple debugging routines.
*)
EXPORT QUALIFIED Halt, DebugString, PushOutput ;
TYPE
WriteP = PROCEDURE (CHAR) ;
(*
Halt - writes a message in the format:
Module:Line:Message
It then terminates by calling HALT.
*)
PROCEDURE Halt (File : ARRAY OF CHAR;
LineNo : CARDINAL;
Function,
Message : ARRAY OF CHAR) ;
(*
DebugString - writes a string to the debugging device (Scn.Write).
It interprets \n as carriage return, linefeed.
*)
PROCEDURE DebugString (a: ARRAY OF CHAR) ;
(*
PushOutput - pushes the output procedure, p, which is used Debug.
*)
PROCEDURE PushOutput (p: WriteP) ;
(*
PopOutput - pops the current output procedure from the stack.
*)
PROCEDURE PopOutput ;
END Debug.