![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Support
![]() |
![]() |
SYNTAX Continue [If expression] DESCRIPTION The Continue command terminates the current iteration of the immediately enclosing For or Loop control structure and continues with the next iteration if expression evaluates to true (or nonzero). Note that null strings evaluate to zero. If you omit If expression, the MPW Shell continues with the next iteration unconditionally. The MPW Shell exits the loop when no further iterations are possible. INPUT None OUTPUT None STATUS
Continue can return the following status codes:
PARAMETERS expression Specifies a Boolean statement containing two clauses and an operator. (For example, {SaveOnClose} == 0.) If you omit this parameter, the MPW Shell continues with the next iteration of the loop unconditionally. OPTIONS None EXAMPLES In the following example, the MPW Shell executes the Continue command if you select No when prompted with a confirmation dialog box asking if you want to print a specified text file. This causes the current file to be skipped rather than printed. Processing continues with the next file in the list. Set Exit 0 Set list "" For file In `files -t TEXT` Confirm -t "Print file {file}?" Set SaveStatus "{Status}" Continue If "{SaveStatus}" == 4 # No Break If "{SaveStatus}" == 5 # Cancel Set list "{list} '{file}' # Yes End If "{list}" != "" Print {PrintOptions} {list} End Set Exit 1 SEE ALSO
|