Chapter 2 Formatting and I/O Library
© National Instruments Corporation 2-11 LabWindows/CVI Standard Libraries
FileToArrayint status = FileToArray (char *fileName, void *array, int dataType,
int numberOfElements, int numberOfGroups,
int arrayDataOrder, int fileLayout, int fileType);
Purpose
Reads data from a file into an array. Can be used with files created using the ArrayToFile
function. The function handles creating, opening, reading, and closing the file.
Parameters
Input fileName string File pathname.
dataType integer Array element data type.
numberOfElements integer Number of elements in array.
numberOfGroups integer Number of Groups in array.
arrayDataOrder integer How groups are ordered in file.
fileLayout integer Direction to write groups in file.
fileType integer ASCII/binary mode.
Output array void* Numeric array.
Return Value
status integer Indicates success or failure.
Return Code
0 Success.
-1 Error attempting to open file.
-2 Error attempting to close file.
-3 An I/O error occurred.
-4 Invalid arrayDataType parameter.
-5 Invalid numberOfElements parameter.
-6 Invalid numberOfGroups parameter.
-7 Invalid arrayDataOrder parameter.
-8 Invalid fileLayout parameter.
-9 Invalid fileType parameter.