QBasic 1.1: INPUT$ Function

Syntax

INPUT$(n[,[#]filenumber%])

Description / Parameter(s)

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