Line Input
Reads one line of input from the keyboard
Line Input [;] [promptstring {;|,} ] stringvariable
promptstring
Reads a line of text from the keyboard and stores it in a string variable.
Syntax
Line Input [;] [promptstring {;|,} ] stringvariable
Parameters
promptstring
prompt to display before waiting for input
stringvariablevariable to receive the line of text
Description
Reads a line of text from the keyboard and stores it in a string variable.
Example
Dim x As String
Line Input "Enter a line:", x
Print "You entered '"; x; "'"
Line Input "Enter a line:", x
Print "You entered '"; x; "'"
Differences from QB
- QBASIC only allowed literal strings for the prompt text. FreeBASIC allows any variable or constant string expression.
See also