This method reads data from an open sequential file and returns a single dimension Variant array.
file.InputFields(number)
Array containing the fields read from the file.
Data read with the InputFields method usually is written to a file with WriteFields. Use this method only with files opened in Input or Binary mode.
InputFields reads standard string or numeric data without modification. The following table shows how InputFields reads other input data.
Data |
Value Assigned to Variable |
Delimiting comma or blank line | Empty |
#NULL# | Null |
#TRUE# or #FALSE# | True or False |
#yyyy-mm-dd hh:mm:ss# | The date and/or time represented by the expression |
Double quotation marks ("") within input data are discarded.
If you reach the end of the file while you are inputting a data item, the input is terminated and an error occurs.
To correctly read data from a file into variables using InputFields, use the WriteFields method instead of the LinePrint method to write the data to the files. Using WriteFields ensures each separate data field is properly delimited.