CANCEL Command
Ends execution of the current Visual FoxPro program file.
CANCEL
Remarks
Control returns to the Command window when Visual FoxPro is being used interactively. If a distributed run-time application is running, CANCEL terminates the application and control returns to Windows. If a program is executing in Visual FoxPro during design time, CANCEL terminates the program and control returns to the Command window.
Executing CANCEL releases all private variables.
Example
The following example simulates a program execution loop. Each time through the loop you are asked if you want to continue. If you press the Cancel button, CANCEL stops program execution.
DO WHILE .T.
IF MESSAGEBOX("Do you want to continue?",36) <> 6
CANCEL
ENDIF
ENDDO
See Also
QUIT | RESUME | RETURN | SUSPEND | Cancel Property | SQLCANCEL( )