ArrayFileGet

Converts a file to a one-dimension array.

Syntax:

ArrayFileGet (filename [, null-char [, extra-alloc]])

Parameters:

(s) filename: path and file name of the file.

(s) null-char: [optional] specifies the character which NULL bytes in the file will be replaced with in the array. If omitted or a blank string(""), then NULL bytes will be removed.

(i) extra-alloc: [optional] specifies the number of additional elements to add to the end of the array. If omitted, it will be 0.

Returns:

(a) array a one dimensional array.

 

By default, the maximum supported file line length is 4096. This can be increased using IntControl 65.

 

Example:

filename = "c:\temp\test.txt"
array = ArrayFileGet (filename , "" , 0)
linecount = ArrInfo(array,6)
Message("Number of lines in the file",linecount)

See Also:

IntControl 39, Arrays, ArrayFileGet, ArrayFileGetCsv, ArrayFilePut, ArrayFilePutCsv, ArrayFromStr, ArrayInsert, ArrayItemize, Arrayize, ArrayLocate, ArrayRedim, ArrayRemove, ArrayReverse, ArraySort, ArraySwapElements, ArrayToStr, ArrDimension, ArrInfo, ArrInitalize, Drop