Input Method

This method returns a string containing characters from a file opened in Input or Binary mode.

Syntax

file.Input(number)

Parameters

file
Reference to a File control.
number
Any valid numeric expression that specifies the number of characters to return.

Return Value

String containing characters read from file.

Remarks

Data read with the Input method usually is written to a file with the LinePrint or Put functions. Use this method only with files opened in Input or Binary mode.

Unlike the LineInputString method, the Input method returns all the characters it reads, including commas, carriage returns, line feeds, quotation marks, and leading spaces.

With files opened for Binary access, an attempt to read through the file using the Input method until the EOF function returns True generates an error. To avoid an error, use the LOF and Loc functions instead of EOF when reading binary files with the Input method or use Get when using the EOF function.