Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


Continue

Built-in

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:

0

no errors

-3

error in parameters, or Continue not within For…End or Loop…End

-5

invalid expression

n

status returned by expression

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

Break

Evaluate

For…

If…

Loop…End

Appendix B, "Expressions"

 
 


Last Updated July 2000