Error getting tags :
error 404Error getting tags :
error 404 exit | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
exit
Basics
Expander triangle
Type
Control Structure
Syntax
exit handler
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Stops execution of a handler.
Examples

if the seconds > timeLimit then exit mouseUp
exit myCustomProperty -- can be used in getProp or setProp handlers

Additional Comments
Expander triangle

Use the exit control structure to skip the rest of a handler's statements without returning a result.

Form:

The exit statement appears on a line by itself, anywhere inside a handler.

Parameters:

The handler is the name of the handler in which the exit control structure appears.

Comments:

You can use an exit control structure in a message handler, function handler, getProp handler, or setProp handler. Usually, exit is used within an if control structure, so that the handler stops if a condition is true and continues if the condition is false.

If the current handler was called from another handler, the calling handler continues executing. The exit statement only stops the current handler, not the calling handler. (To stop all pending handlers, use the exit to top control structure.)

When a handler executes an exit statement, the message, trigger, function call, or getProp call stops and is not passed to the next object in the message path. To halt the current handler and pass the message, trigger, or call on through the message path, use the pass control structure instead. To halt the current handler and return a result, use the return control structure instead.

Note: The exitcontrol structure is implemented internally as a command and appears in the commandNames.

User Comments
Expander triangle