Libraries |
|
Stritext | Source Code |
|
|
Function Summary | |||||
file |
| ||||
void |
| ||||
char |
| ||||
string |
| ||||
string |
| ||||
boolean |
| ||||
boolean |
| ||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
void |
| ||||
void |
| ||||
void |
|
Function Detail |
openStriText
const func file: openStriText (in array string: content)
write
const proc: write (inout striText: outStriText, in string: stri)
-
Write the string stri to outStriText.
getc
const func char: getc (inout striText: inStriText)
-
Read a character from inStriText.
- Returns:
- the character read, or EOF at the end of the file.
gets
const func string: gets (inout striText: inStriText, in var integer: maxLength)
-
Read a string with a maximum length from inStriText.
- Returns:
- the string read.
- Raises:
- RANGE_ERROR - The parameter maxLength is negative.
getln
const func string: getln (inout striText: inStriText)
-
Read a line from inStriText. A striText works as if all lines end with '\n'. The line ending character is not copied into the string. When the function is left inStriText.bufferChar contains '\n' or EOF.
- Returns:
- the line read.
eof
const func boolean: eof (in striText: inStriText)
-
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 (in striText: inStriText)
-
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 (in striText: aStriText)
-
Obtain the length of a aStriText. The file length is measured in characters.
- Returns:
- the length of a file.
tell
const func integer: tell (in striText: aStriText)
-
Obtain the current file position of aStriText. 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.
height
const func integer: height (in striText: aStriText)
-
Get the height of aStriText.
- Returns:
- the height of aStriText.
width
const func integer: width (in striText: aStriText)
-
Get the width of aStriText.
- Returns:
- the width of aStriText.
line
const func integer: line (in striText: aStriText)
-
Determine the current line of aStriText.
- Returns:
- the current line of aStriText.
column
const func integer: column (in striText: aStriText)
-
Determine the current column of aStriText.
- Returns:
- the current column of aStriText.
setPos
const proc: setPos (inout striText: aStriText, in integer: line, in integer: column)
-
Set the current position of aStriText to line and column.
setLine
const proc: setLine (inout striText: aStriText, in integer: line)
-
Set the line of the current position of aStriText.
setColumn
const proc: setColumn (inout striText: aStriText, in integer: column)
-
Set the column of the current position of aStriText.
|
|