Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>input get input from keyboard</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INPUT                    Get Input from Keyboard

INPUT[;]["prompt" {; | ,}] variable [,variable]...

    Assigns input from the keyboard to one or more string or numeric
    variables.

           ;    If a semicolon is included directly after the INPUT
                keyword, QuickBASIC does not issue a carriage return/line
                feed after receiving the user's input.

      prompt    A string constant supplying a prompt to guide the user.

    variable    The name of a variable (string or numeric) that will
                receive input.

   ----------------------------------------------------------------------

      Notes:    A prompt may be included in the INPUT statement to guide
                the user; if included, it must be a string constant,
                enclosed within quote marks.

                If a prompt is included, it must be followed by either a
                semicolon or a comma (outside the quotes, before the first
                variable name). If it's followed by a semicolon,
                QuickBASIC displays a question mark after the prompt
                string. If it's followed by a comma, QuickBASIC suppresses
                the question mark.

                If no prompt is included, QuickBASIC displays a question
                mark.

                If more than one variable is included in the INPUT
                statement, the user must enter values for all variables,
                separated by commas. If only one variable is included in
                the INPUT statement, the user has the option of simply
                pressing the Enter key; QuickBASIC interprets that action
                as 0 (for numeric variables) or null (for string
                variables).

                If the user enters too few or too many values in response
                to an INPUT statement, QuickBASIC displays a ?Redo from
                Start error message; no values are assigned to variables
                until satisfactory input is received.

                If the user enters a comma in response to an INPUT
                statement, BASIC displays a ?Redo from Start error
                message. You can avoid this irritation by using LINE
                INPUT, instead of INPUT.

                Input for a string variable need not be enclosed in quote
                marks. String input that is enclosed within quotes is
                handled as though it were not (QuickBASIC ignores the
                quotes).

                Input to a numeric variable must be numeric.

                Editing keystrokes are active during response to INPUT. To
                receive such keystrokes as part of an input string, use
                INKEY$.

See Also: INKEY$ INPUT # INPUT$ LINE INPUT LINE INPUT #

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson