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

Spec.Terminal History

Hide minor edits - Show changes to output

2010-05-24 12:39 by benjk -
Changed lines 3-11 from:
PROCEDURE Read (VAR theItem : <anyType>);
(* This is a macro that the compiler expands to TypeOf (theItem).Read (StdIO.StdInFile (), theItem) *)
(* Pre: theItem.Read is visible in the requesting scope *
)
(* Post: theItem is read from the currently defined standard output file and assigned to theItem *)

PROCEDURE Write (theItem : <anyType>);
(* This is a macro that the compiler expands to TypeOf (theItem).Write (StdIO.StdOutFile (), theItem
) *)
(* Pre: theItem.Write is visible in the requesting scope *)
(* Post: theItem is written to the currently defined standard output file *)
to:
(* 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.
*)