LINE INPUT

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
LINE INPUT [prompt$,] string-variable$
LINE INPUT #nbr, string-variable$

Description:

LINE INPUT [prompt$,] string-variable$
Reads an entire line from the console input into ‘string-variable$’. ‘prompt$’ is a string constant (not a variable or expression) and if specified it will be printed first. 
Unlike INPUT, this command will read a whole line, not stopping for comma delimited data items. 
A question mark is not printed unless it is part of ‘prompt$’.

LINE INPUT #nbr, string-variable$
Same as the LINE INPUT command except that the input is read from a file previously opened for INPUT as ‘#fnbr’ or a serial communications port previously opened for INPUT as ‘nbr’. 
See the OPEN command. #0 can be used which refers to the console.

Example reading a file, one line at a time.

 OPEN "temp.bas" FOR INPUT AS #2
 DO WHILE NOT EOF(#2)
   LINE INPUT #2, txt$
   PRINT txt$
 LOOP
 CLOSE #2

Last edited: 30 September, 2020