Functions for general purpose text input and output with files.
textio | Functions for general purpose text input and output with files. |
Enumerations | |
Mode | Mode to use when opening a file. |
Types | |
TextFile | Opaque type representing a text file on disk. |
Exceptions | |
TextioException | General exception for errors raised by this module. |
TextioException. | An invalid (NIL) file was used. |
TextioException.Open | File was unable to be opened. |
TextioException. | An error occurred while writing to a file. |
Variables | |
stdin | The standard input file. |
stdout | The standard output file. |
stderr | The standard error file. |
Functions | |
close | Close a file. |
open | Open a file with the given name and mode. |
readLine | Read a line of text from a file. |
seekEnd | Seek to the end of a file. |
seekStart | Seek to the start of a file. |
truncate | Truncate the file at the current position. |
writeLine | Write a string, followed by a newline, to a file. |
Close a file.
DECLARE NATIVE FUNCTION close( f: TextFile )
Open a file with the given name and mode.
DECLARE NATIVE FUNCTION open( name: String, mode: Mode ): TextFile
Read a line of text from a file.
DECLARE NATIVE FUNCTION readLine( f: TextFile, OUT s: String ): Boolean
Seek to the end of a file.
DECLARE NATIVE FUNCTION seekEnd( f: TextFile )
Seek to the start of a file.
DECLARE NATIVE FUNCTION seekStart( f: TextFile )
Truncate the file at the current position.
DECLARE NATIVE FUNCTION truncate( f: TextFile )
Write a string, followed by a newline, to a file.
DECLARE NATIVE FUNCTION writeLine( f: TextFile, s: String )