Maptitude GISDK Help |
Reads a string of characters from a text file.
line = ReadLine(file fptr)
Argument |
Contents |
fptr |
A file handle |
A string read from the current position in the text file.
ReadLine() stops reading when it reaches a newline character or the end of the file.
The maximum size of the string read is 5119 characters. Longer strings are truncated, and the remainder is read with the next ReadLine().
// Make sure the path is correct for your installation of Maptitude
fptr = OpenFile("C:\\Program Files\\Maptitude\\mtdata.txt", "r")
while not FileAtEOF(fptr) do
ShowMessage(ReadLine(fptr))
end
CloseFile(fptr)
Error Type |
Meaning |
EndOfFile |
The end of the file is encountered while reading a line |
Error |
The file is not open, the file is not open for reading, or the file is a binary file |
Function |
Summary |
Closes a file |
|
Writes a string of characters to a text file |
|
Reads a group of strings from a file |
|
Opens a text or binary file on disk |
©2025 Caliper Corporation | www.caliper.com |