INPUT$ Function
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Returns a string of characters read from a specified file.
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.
Example:
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►