INPUT "Please input a number"; A1%
Please input a number?
Now we come to strings. Strings are just like any other variable in QBasic, except that you cannot perform
mathematical operations on them and all string variables must end with a '$'. For example a$, is a valid string
variable. A string variable can store not only numbers, but any printable character.
Example:
INPUT "Please Enter your name: ", name$
PRINT "Your Name is:"; name$
Please Enter your name: Nable
Your Name is: Nable
There are many ways to manipulate strings, but they will be discussed in later sections of the tutorial. You should now
have a good feel for the general way that output is printed to the screen, how input is obtained from the user and how variables work. These
are important concepts. As the tutoral progresses it will be assumed that you understand the general form of input and output.
The examples listed above should serve as a good basis.
Back | Tutorial Part 1 | Next |