open "addrph" for input as 1 input #1, a$ close #1 print a$With a random file:
open "addrph" as #1 len=80 field #1, 40 as n$ get #1 input #1, a$ close #1 print a$
input Var[, Var]...
is the synopsis of the input statement for disk file input (as described above) when standard input is redirected to a disk file. Although the organization of these manual pages implies the older, less flexible system, this organization is maintained only for convenience, input and input # do not differ functionally. The difference in behavior between terminal input and disk file input depends entirely upon the type of file in use.
An "Illegal function call" error occurs if the file is open for output only.
An "Input past end" error occurs if the number of data items remaining is less that the number of items expected.
An "Overflow" error occurs if the value of a data item exceeds the precision of the associated variable.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber