|
Qbasic Tutorial for beginners and children (Under Construction) |
Two BASIC reserved wordsIt is not necessary for you to know all the BASIC reserved words to get started. You could write a lot of programs using about 10 keywords. To get started we'll be using only two of them:
Your First BASIC programTo begin we will write a simple program that will output a text on the screen. Type the following in the untitled window:
The output on the screen will be as follows:
Once the execution of your program is completed, BASIC will display a "Press any key to continue" message on the screen. So press any key to return to your programming environment. If you run your program many times, you will notice that the same text will be displayed several times on the screen as shown below:
To get your screen cleared each time you run you program, put the CLS statement at the beginning of your program:
Note the presence of inverted commas(" ") in the PRINT statement. Always put inverted commas if you want to output sentences or characters. We will be discussing more about it in Chapter 3. |
|
|