![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Support
![]() |
![]() |
SYNTAX Break [If expression] DESCRIPTION The Break command terminates execution of the immediately enclosing For or Loop control structure if expression evaluates to TRUE (nonzero). If you omit If expression, the loop breaks unconditionally. INPUT None OUTPUT None STATUS
Break can return the following status codes:
PARAMETERS expression Specifies an expression of the form operand operator operand If this expression evaluates to TRUE (nonzero), the loop breaks. (For a more detailed definition of expression, see the Evaluate command.) OPTIONS None EXAMPLES The following command line terminates execution of the enclosing loop if the previous command returns a nonzero status value. See the next example for a sample of how this command line can be used in scripts. Break If {Status} != 0 In this example, the For loop entabs and prints each of the special MPW scripts. The loop is terminated by Break if Entab returns a nonzero status value. See the For… command for further explanation of this example.
Set Exit 0 The script below loops until the variable {loopcount} returns a value greater than 10. Note the use of the Evaluate command (line 5).
Set loopCount 0 SEE ALSO
|