Operating the Command Window

You can execute a Visual FoxPro command by typing it into the Command window and pressing ENTER. To re-execute the command, move the cursor to any place on the line containing the command and press ENTER again.

You can even run multiple lines of code from the Command window as though they were a self-contained program.

To run multiple lines of code in the Command window

  1. Select the lines of code.
  2. Press ENTER or choose Execute Selection from the shortcut menu.

Since the Command window is an editing window, you can edit commands using the editing tools available in Visual FoxPro. You can edit, insert, delete, cut, copy, or paste text in the Command window.

The advantage of entering code in the Command window is that the instructions are carried out immediately. There is no need to save a file and run it as a program.

In addition, choices you make from menus and dialog boxes are echoed in the Command window as commands. You can copy and paste these commands into a Visual FoxPro program, then run the program repeatedly, making it easy to execute thousands of commands repeatedly.

See Also

Creating Programs versus Inputting Manually | Creating Programs | Command Window