Home > Articles > Programming

Crankin' It Up with the QBasic Programming Environment

  • Print
  • + Share This
Clayton Walnum covers the QBasic programming environment and teaches you how to write your first program.
This sample chapter is excerpted from The Complete Idiot's Guide® to Programming Basics, by Clayton Walnum.
This chapter is from the book

In This Chapter

  • Running QBasic
  • Giving commands to QBasic
  • Loading, saving, and printing programs
  • Typing program text
  • Editing program text
  • Finding words or phrases in a program

Now that you have a general idea of what a computer program is and how it works, it's time to load up QBasic and get to work. In this chapter, you learn about the QBasic programming environment and how to write your first program. If you've used word processors before, this chapter covers a lot of familiar ground. If you have no experience with text editing, however, you should study carefully the discussions that follow. After all, you can't write a program until you know how to type it in!

Where Is QBasic?

In the old days, the most common computer operating system was MS-DOS, which stands for most skunks don oval slippers. (If you believe that, close this book now; you have no hope of becoming a programmer.) Actually, MS-DOS stands for Microsoft disk operating system. This operating system, just like any other program, was software installed on your computer. It may have already been installed when you bought your computer, or you may have installed it yourself. In either case, the QBasic programming language came with it.

Now (almost) everyone uses Microsoft Windows, and all that MS-DOS stuff is as archaic as dinosaur footprints. However, QBasic still remains a very useful language for learning to program, if for no other reason than it's free and almost everyone has it. Yep, that's right. Even though you're running Microsoft Windows, you still have a copy of QBasic. You just have to find it. Let me give you a hand.

First, take out your Microsoft Windows installation CD-ROM. After you have the CD-ROM, look in the Tools\oldmsdos directory. You should see two files named qbasic.exe and qbasic.hlp. Just copy those files to a directory named QBasic on your computer's hard disk, and you're ready to go! If you have a hard time locating these files, go to your Start menu, select the Search item, and then select For Files and Folders. When the search window appears, use it to search the CD-ROM and your hard disks for the qbasic.exe file.

Point of Interest

If Microsoft Windows was installed on your computer when you bought it and you can't find a Windows installation disk, call the company from which you bought the computer and ask where your copy of QBasic is.

  • + Share This
  • 🔖 Save To Your Account