Explanation
INPUT$ Function
Returns a string of characters read from a specified file.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
INPUT$(n[,[#]filenumber%]) |
n | The number of characters (bytes) to read. |
filenumber% | The number of an open file. If filenumber% is omitted, INPUT$ reads from the keyboard. |
OPEN "TEST.DAT" FOR OUTPUT AS #1
PRINT #1, "The text"
CLOSE
OPEN "TEST.DAT" FOR INPUT AS #1
PRINT INPUT$(3, 1) 'Print first 3 characters.
CLOSE
See also: | INPUT, LINE INPUT |