openEcho
const func file: openEcho (in file: inFile, in file: outFile)
-
Open a file that echoes characters read from inFile to outFile.
Reading operations are forwarded to inFile. All normal characters
that are read from inFile are also written to outFile.
- Returns:
- the file opened.
getc
const func char: getc (inout echoFile: inFile)
-
Read a character from an echoFile.
The request is forwarded to inFile. The character read from
inFile is written (echoed) to outFile. Ctrl-C and ctrl-T
are handled special, as they can be used to terminate the
program. The user is asked for confirmation before the program
is terminated.
- Returns:
- the character read, or EOF at the end of the file.
gets
const func string: gets (inout echoFile: inFile, in integer: maxLength)
-
Read a string with a maximum length from an echoFile.
- Returns:
- the string read.
- Raises:
- RANGE_ERROR - The parameter maxLength is negative.