dos_compilers/Logitech Modula-2 v1/FILENAME.DEF

29 lines
975 B
Plaintext
Raw Permalink Normal View History

2024-07-01 00:16:10 +02:00
DEFINITION MODULE FileNames;
(*
Read a file specification from the terminal.
Derived from the Lilith Modula-2 system developed by the
group of Prof. N. Wirth at ETH Zurich, Switzerland.
*)
EXPORT QUALIFIED FNParts, FNPartSet, ReadFileName;
TYPE FNParts = (FNDrive, FNPath, FNName, FNExt);
FNPartSet = SET OF FNParts;
PROCEDURE ReadFileName(VAR resultFN: ARRAY OF CHAR;
defaultFN: ARRAY OF CHAR;
VAR ReadInName: FNPartSet);
(*- Read a file specification from terminal.
in: defaultFN default file specification,
out: resultFN the file specifications,
ReadInName which parts are in specification.
Reads until a <cr>, blank, <can>, or <esc> is typed.
After a call to ReadFileName, Terminal.Read must be called to
read the termination character.
The format of the specifications depends on the host operating system.
*)
END FileNames.