Loading a QBasic Program
Before you can run a QBasic program, the program must be loaded. This doesn't mean you should force your program to chug-a-lug a quart of Smirnoff's; it means you must bring the program's text file (called the source code) into QBasic's editor window.
Source code is the program text that you type into an editor. With compiled languages, a program's source code no longer is needed after the program is compiled. Still, programmers usually save their source code so that they can make changes or additions to the program. Programmers also save their source code so that they can impress their friends and attract members of the opposite sex with their cleverness.
You load a source-code file with the Open command of the File menu, as shown in Figure 3.3.
When you select the Open command, you'll see a dialog box similar to the one shown in Figure 3.4.
Figure 3.3 Select the Open command.
Figure 3.4 The Open dialog box.
As with menus, you can select files from this dialog box with either your keyboard or your mouse. To use your keyboard, type the name of the file you want to load and press Enter. If you want to avoid typing the filename, press Tab to move the cursor to the Files list box. Use the up- and down-arrow keys to highlight the file you want and press Enter to load the file.
You can select any button at the bottom of the dialog box by pressing your keyboard's Tab key until the blinking text cursor is on the button and then pressing Enter.
To select a file using your mouse, double-click the file you want in the Files list box. To double-click a file, place your mouse pointer over the file's name and then click the mouse's left button twice quickly. You can also select the file by clicking the file once to highlight it and then clicking the OK button at the bottom of the dialog box.
If you change your mind about opening a file, just select the Cancel button.
Of course, right now, you don't have any programs to load, so you'll just have to take all of this on faith!
Point of Interest
Tabbing is the process of using your computer's Tab key to move from one part of a dialog box to another. Most dialog boxes contain many partsincluding text-entry fields and buttonsthat you must access in one way or another. If you have a mouse, you can just click the field or button you want to access. Keyboard users, on the other hand, can use the Tab key to move to the next field or button in the dialog box. When you get to the last field or button, pressing Tab moves you back to the first.