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

Terminal

DEFINITION MODULE Terminal;

(* Basic Terminal-based IO *)

PROCEDURE Read ( VAR ch : CHAR );
(* Reads one character from stdIn and passes it back in <ch>. *)

PROCEDURE Write ( ch : CHAR );
(* Writes character <ch> to stdOut. *)

PROCEDURE ReadString ( VAR s : ARRAY OF CHAR );
(* Reads a character sequence terminated by Newline from stdIn
   and passed it back in s. *)

PROCEDURE WriteString ( CONST s : ARRAY OF CHAR );
(* Writes character string s to stdOut. *)

PROCEDURE WriteLn;
(* Writes Newline to stdOut. *)

END Terminal.