LINEINPUT
LINEINPUT [#fileN,] var
Reads a whole text line from file or console and stores it in the
string var
. If a file handle #fileN
is
specified, LINEINPUT will read from the corresponding file otherwise it
will read from the console.
Example 1: Read from console
LINEINPUT S
PRINT S
Example 2: Read from file
' create a file
open "File.txt" for output as #1
print #1, "First line"
print #1, "Second line"
close #1
' open file and print content
open "File.txt" for input as #1
LINEINPUT #1, S
Print S
LINEINPUT #1, S
Print S
close #1
Code samples using LINEINPUT
Console
AT
BEEP
CAT
CLS
DEFINEKEY
FORM
INKEY
INPUT
LINEINPUT
LINPUT
LOCATE
LOGPRINT
NOSOUND
PEN
PLAY
PRINT
SOUND
TAB
If there is insufficient information on this page and you wish learn more about LINEINPUT,
please send an email to smallbasic@gmail.com. You can help to improve information about
LINEINPUT by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.