![]() ![]() You select the find function, type in red, and press Enter. For example, suppose you're looking for the word "red" in your program. In addition to checking for case, you can also tell QBasic's search function to find only whole words. To toggle an option box with your mouse, place your mouse pointer over the option and click the left mouse button. Tab to the option box and then press the spacebar to toggle (turn on or off) the option. Press your keyboard's Tab key until the blinking text cursor is in the option's check box. To select an option box from the keyboard, follow these steps: (Option boxes look like a pair of square brackets and are used to turn various options on or off.) When this option is selected, the search finds only words that match exactly, including the case of the letters. You can make the search case sensitive by checking the Match Upper/Lowercase option box. Notice that QBasic doesn't care whether the word or phrase contains upper- or lowercase letters. ![]() Each time you select this command, QBasic finds another occurrence of the word "name." To find other occurrences of this word, select the Repeat Last Find entry of the Search menu or just press F3. QBasic finds and highlights the first occurrence of the word "name." In the Find What edit box, type the word name and press Enter. Press Ctrl+Home to place the blinking text cursor at the beginning of your program. ![]() Try the Find command now by following these steps: If you don't want to search for a word or phrase, you might want to ask yourself why the heck you're staring at the Find dialog box. If you want to look for a different word or phrase, type it into the Find What edit box and press Enter. If this is the word you want to find, just press Enter to start the search. When the Find dialog box appears, the word at the text cursor's location appears in the Find What edit box. You'll see the dialog box in Figure 3.14. To find the next occurrence (starting at the text cursor's location) of any word or phrase, select the Find item of the Search menu. These commands are, of course, found in the Search menu, shown in Figure 3.13.Īs you can see, the Search menu contains three entries: Find, Repeat Last Find, and Change. Luckily, QBasic includes search commands. ![]() However, in large programs, finding text visually is tougher than chasing an angry bear up a tree. For example, if you want to find the keyword INPUT, just look at the screen and there it is. In a small program like the one you just wrote, it's easy to find specific words or phrases. Complete Idiot's Guide® to Programming Basics, The ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |