ReadSizedArray()

Summary

Reads a group of strings from a text file.

Syntax

result = ReadSizedArray(file fptr, integer n)

Argument Contents
fptr A file handle
n Number of strings to be read

Returns

An array of n strings.

Notes

  • ReadSizedArray() reads each line in the text file as a single string. That is, if n is 5, ReadSizedArray() reads the next five lines of the file and returns an array of five strings.

  • Zero length strings (e.g., a blank line in the input file) are represented as null elements in the array.

See Also

Function Summary
CloseFile() Closes a file
LoadArray() Loads an array from a file
OpenFile() Opens a text or binary file on disk
ReadArray() Reads a text file into an array of strings
ReadLine() Reads a string from a text 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