dos_compilers/Logitech Modula-2 v1/FILENAME.DEF
2024-06-30 15:16:10 -07:00

29 lines
975 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.