Line Input # Statement
Reads a single line from an open sequential file and assigns it to a String variable.
Syntax
Line Input #filenumber, varname
The Line Input # statement syntax has these parts:
| Part | Description |
|---|---|
| filenumber | Required. Any valid file number. |
| varname | Required. Valid Variant or String variable name. |
Remarks
Data read with Line Input # is usually written from a file with Print #.
The Line Input # statement reads from a file one character at a time until it encounters a carriage return (Chr(13)) or carriage return-linefeed (Chr(13) + Chr(10)) sequence. Carriage return-linefeed sequences are skipped rather than appended to the character string.
Example
This example uses the Line Input # statement to read a line from a sequential file and assign it to a variable. This example assumes that
|
|