Maptitude GISDK Help |
Writes the elements of an array to a text file.
WriteArray(file file_ptr, array a)
Argument |
Contents |
file_ptr |
A file handle |
a |
An array of strings and numbers |
All elements of the array are written as strings.
Each element of the array is written to a separate line in the file.
The file must be opened in write mode.
Array elements that are not numeric or strings are ignored, so WriteArray() does not handle sub- arrays.
Use SaveArray() to save an array in a binary format that can be read by LoadArray().
list = {"Eric", "Mary", "Aaron", 275, "Howard"}
ptr = OpenFile("listfile.txt", "w")
WriteArray(ptr, list)
CloseFile(ptr)
Error Type |
Meaning |
Error |
File is not open, is open in read-only mode, or is a binary file |
Function |
Summary |
Opens a text or binary file on disk |
|
Reads a text file into an array of strings |
|
Reads a group of strings from a file |
|
Saves an array to a file |
|
Writes the elements of an array to a file, separated by a delimiter |
©2025 Caliper Corporation | www.caliper.com |