Site hosted by Angelfire.com: Build your free website today!

Tutorial 1


QBasic is a very powerfull tool. You can use it to do virtually anyghing on your computer. However, because it is now considered archaic, it is rarely used as much as other languages such as Visual Basic, C, or Unix. Also, QBasic runs in DOS, therefore, the finished program that you make will not be viewed from a Windows layout.

Let me now explain the basic commands (things you type into your program to make it perform specific operations):

 Command                                            Description        
   CLS                                            Clears the screen    
  PRINT                                     Prints text on the screen  

This may seem very strange, the fact that these two commands are used more often than any other commands. This is partially true. As you progress in abliliy you will use these commands less and less. Yet, for the next couple weeks, you will use these the most. Below is a sample program to try. If you wish to try it, you will select the text, print it out, then, go into QBasic and retype it. Since QBasic is in DOS, copying and pasting won't work (a major downside!).

Here is that program:

CLS
PRINT "HELLO MY FRIEND."

*Note. When you run a program in QBasic after it has finished it's command route, it will print "Press any key to continue" at the bottom of the screen. This is normal (and annoying). There are tricks to get around this, but those are tricks for another tutorial. As you see you enclose the text you wish for it to print in quotation marks. Expiriment around with this until you are completely comfortable with these two commands. Try not clearing the screen every time (take out CLS). What happens? Why? Happy Programming!
This page was created by Chad R. (aka QBasicBoy)
Last modified 7-5-99