Libraries |
|
I/O Buffer | Source Code |
|
|
Types | ||||
|
Function Summary | |||||
file |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
char |
| ||||
string |
| ||||
boolean |
| ||||
boolean |
| ||||
integer |
| ||||
boolean |
| ||||
void |
| ||||
integer |
|
Function Detail |
openBufferFile
const func file: openBufferFile (in file: baseFile)
-
Open a bufferFile based on the given baseFile.
- Returns:
- the file opened.
flush
const proc: flush (inout bufferFile: aBufferFile)
-
Forces that all buffered data of aBufferFile is sent to its destination.
write
const proc: write (inout bufferFile: outBufferFile, in string: stri)
-
Write the string stri to outBufferFile.
getc
const func char: getc (inout bufferFile: inBufferFile)
-
Read a character from inBufferFile.
- Returns:
- the character read, or EOF at the end of the file.
gets
const func string: gets (inout bufferFile: inBufferFile, in integer: maxLength)
-
Read a string with maximum length from inBufferFile.
- Returns:
- the string read.
- Raises:
- RANGE_ERROR - The parameter maxLength is negative.
eof
const func boolean: eof (in bufferFile: inBufferFile)
-
Determine the end-of-file indicator. The end-of-file indicator is set if at least one request to read from the file failed.
- Returns:
- TRUE if the end-of-file indicator is set, FALSE otherwise.
hasNext
const func boolean: hasNext (inout bufferFile: inBufferFile)
-
Determine if at least one character can be read successfully. This function allows a file to be handled like an iterator.
- Returns:
- FALSE if getc would return EOF, TRUE otherwise.
length
const func integer: length (inout bufferFile: aBufferFile)
-
Obtain the length of a aBufferFile. The file length is measured in characters.
- Returns:
- the length of a file.
seekable
const func boolean: seekable (in bufferFile: aBufferFile)
-
Determine if the file aFile is seekable. If a file is seekable the functions seek and tell can be used to set and and obtain the current file position.
- Returns:
- TRUE, if aFile is seekable, FALSE otherwise.
seek
const proc: seek (inout bufferFile: aBufferFile, in integer: position)
-
Set the current file position. The file position is measured in characters from the start of the file. The first character in the file has the position 1. It is possible to switch between reading and writing a bufferFile (and vice versa) as long as seek() is called in between.
- Raises:
- RANGE_ERROR - The file position is negative or zero.
tell
const func integer: tell (in bufferFile: aBufferFile)
-
Obtain the current file position of aBufferFile. The file position is measured in characters from the start of the file. The first character in the file has the position 1.
- Returns:
- the current file position.
|
|