summaryrefslogtreecommitdiff
path: root/dviware/psprint/vms/termout.def
blob: 7528d5eb33aa014b38b4546ce2e0b13c3576b539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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.