Purpose
Suspends a running MapBasic application, for debugging purposes. You can issue this statement from the MapBasic window in MapInfo Pro.
Syntax
Stop
Restrictions
You cannot issue a Stop statement from within a user-defined function or within a dialog box's handler procedure; therefore you cannot issue a Stop statement to debug a Dialog statement while the dialog box is still on the screen.
Description
The Stop statement is a debugging aid. It suspends the application which is running, and returns control to the user; presumably, the user in this case is a MapBasic programmer who is debugging a program.
When the Stop occurs, a message appears in the MapBasic window identifying the program line number of the Stop.
Following a Stop, you can use the MapBasic window to investigate the current status of the program. If you type:
? Dim
into the MapBasic window, MapInfo Pro displays a list of the local variables in use by the suspended program. Similarly, if you type:
? Global
into the MapBasic window, MapInfo Pro displays a list of the global variables in use.
To display the contents of a variable, type a question mark followed by the variable name. To modify the contents of the variable, type a statement of this form:
variable_name = new_value
where variable_name is the name of a local or global variable, and new_value is an expression representing the new value to assign to the variable.
To resume the execution of the application, choose Continue statement into the MapBasic window.
; note that, while a program is stopped, Continue appears on the File menu instead of Run. You can also restart a program by typing aDuring a Stop, MapInfo Pro keeps the application file open. As long as this file remains open, the application cannot be recompiled. If you use a Stop statement, and you then wish to recompile your application, choose
before attempting to recompile.See Also:
Continue statement