| Maptitude GISDK Help |
Reads a text file into an array of strings.
result = ReadArray(file fptr)
| Argument | Contents |
|---|---|
| fptr | A file handle |
An array of strings, one for each line in the file.
ReadArray() reads each line in the file as a single string.
Zero length strings (e.g., a blank line in the input file) are represented as null elements in the array.
Use LoadArray() to load an array saved in a binary format by SaveArray().
ptr = OpenFile("listfile.txt", "r")
a = ReadArray(ptr)
CloseFile(ptr)
| Error Type | Meaning |
|---|---|
| Error | File is not open, is open in the wrong mode, or is a binary file |
| Function | Summary |
|---|---|
| LoadArray() | Loads an array from a file |
| OpenFile() | Opens a text or binary file on disk |
| ReadSizedArray() | Reads a group of strings from a file |
| WriteArray() | Writes the elements of an array to a text file |
| WriteArraySeparated() | Writes the elements of an array to a file, separated by a delimiter |
| ©2025 Caliper Corporation | www.caliper.com |