QBasic Basal Ascribe
31 July 17:51
The Ascribe command is acclimated to accumulate ascribe from the user . This area will attack to advise you how to accumulate ascribe aloft appeal from the user . For real-time input, see .
Here is the syntax of the ascribe command:
:INPUT [text to user ]; [variable]
: or
:INPUT [text to user ], [variable]
Example:
When an semicolon (;) is acclimated amid the argument to the user and the capricious a catechism mark and a amplitude is added. If a breach (,) is acclimated no catechism mark is added.
The stored capricious can now be acclimated in achievement to the user :
Please note: The capricious will alone abundance what the user enters, so you haveto create abiding that if programming, you add spaces central the citation marks (as apparent above) so that it reads properly. Not inserting spaces will concatenate the two words.
Here is the syntax of the ascribe command:
:INPUT [text to user ]; [variable]
: or
:INPUT [text to user ], [variable]
Example:
INPUT What is your name; name$
When an semicolon (;) is acclimated amid the argument to the user and the capricious a catechism mark and a amplitude is added. If a breach (,) is acclimated no catechism mark is added.
The stored capricious can now be acclimated in achievement to the user :
INPUT What is your name; name$
INPUT Hello, ; name$; ! How old are you; age$
PRINT The user , ; name$; is ; age$; years old
Please note: The capricious will alone abundance what the user enters, so you haveto create abiding that if programming, you add spaces central the citation marks (as apparent above) so that it reads properly. Not inserting spaces will concatenate the two words.
|
Tags: basic input, variable, , qbasic basic input, |
Also see ...
PermalinkArticle In : Computers & Technology - Programming