1987-05-13 14:36:45 +00:00
|
|
|
DEFINITION MODULE Terminal;
|
1988-02-19 15:54:01 +00:00
|
|
|
(*
|
|
|
|
Module: Input/Output to/from terminals
|
|
|
|
From: "Programming in Modula-2", 3rd, corrected edition, by N. Wirth
|
|
|
|
Version: $Header$
|
|
|
|
*)
|
1987-05-13 14:36:45 +00:00
|
|
|
|
|
|
|
PROCEDURE Read(VAR ch : CHAR);
|
|
|
|
(* Read a character from the terminal and leave it in ch
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE BusyRead(VAR ch : CHAR);
|
|
|
|
(* Read a character from the terminal and leave it in ch.
|
|
|
|
This is a non-blocking call. It returns 0C in ch if no
|
|
|
|
character was typed.
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE ReadAgain;
|
|
|
|
(* Causes the last character read to be returned again upon the
|
|
|
|
next call of Read.
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE Write(ch : CHAR);
|
|
|
|
(* Write character ch to the terminal.
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE WriteLn;
|
|
|
|
(* Terminate line.
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE WriteString(s : ARRAY OF CHAR);
|
|
|
|
(* Write string s to the terminal.
|
|
|
|
*)
|
|
|
|
|
|
|
|
END Terminal.
|