DEFINITION MODULE TermOut;

(* Author:         Andrew Trevorrow
   Implementation: University of Hamburg Modula-2 under VAX/VMS version 4
   Date Started:   August, 1986

   Description:
   These terminal output routines have been targeted at just one client: PSDVI.
   NB:
   - Halt will NOT display any message, unlike Hamburg's HALT.
     It will also set the VMS $SEVERITY value:
        Halt(0) exits and sets $SEVERITY to Warning.
        Halt(1) exits and sets $SEVERITY to Success.
        Halt(2) exits and sets $SEVERITY to Error.
   - Output will only be updated after a WriteLn.

   Revised:
   June--August, 1988 (while at Aston University)
 - No longer export WriteBuffer/StartLn.
 - My Terminal module had to be renamed to TermOut to avoid collision with
   standard library module.
*)

PROCEDURE Write (ch: CHAR);
(* Write given character to output. *)

PROCEDURE WriteString (s: ARRAY OF CHAR);
(* Write given string of characters to output.
   s is terminated by first NULL (unless full).
*)

PROCEDURE WriteInt (i : INTEGER);
(* Write given integer to output. *)

PROCEDURE WriteCard (c : CARDINAL);
(* Write given cardinal to output. *)

PROCEDURE WriteLn;
(* Write end-of-line and update output. *)

PROCEDURE Halt (status : CARDINAL);
(* Terminate program with given status: 0 = warning, 1 = success, 2 = error.
   No message is generated.
*)

END TermOut.
