Input Function

 

Input(n , [ #] filenumber )

 

Input returns characters from a sequential file.

 

The input function has two parameters n and filenumbern  is the number of bytes to be read from a file and filenumber  is the number used in the open statement when the file was opened.

 

Example:

 

Sub Main

    Open "TESTFILE" For Input As #1   ' Open file.

    Do While Not EOF(1)    ' Loop until end of file.

   MyStr = Input(10, #1)   ' Get ten characters.

   MsgBox MyStr

    Loop

    Close #1         ' Close file.

End Sub