QBASIC - Statements - LINE INPUT gox.gif (837 bytes)INPUT

LINE INPUT reads a line of up to 255 characters from the keyboard or a sequential file.
 

LINE INPUT from Keyboard

LINE INPUT s$     'the terminal <enter> moves cursor to next line 
                  ' - or scrolls the screen
LINE INPUT ; a$   'keeps cursor on the line

 

LINE INPUT from File

a$ = "en, to"
b$ = "tre"
File written with :
PRINT a$, b$
en, to        tre
File written with :
WRITE a$, b$
"en, to","tre"
OPEN "test.txt" FOR INPUT AS #1
LINE INPUT #1, a$
PRINT a$
CLOSE
 
Output:
en, to        tre
 
Output:
"en, to","tre"