# pause

Pause execution

### state = pause

• The first statement above pauses the currently executing program.
• When an output argument state is provided (second statement above), it returns the current pause state and does not perform pausing.

### state = pause(n)

• The first statement above pauses the currently executing program for n seconds. The execution will resume automatically after pausing.
• When an output argument state is provided (second statement above), it returns the current pause state and does not perform pausing.

### state = pause(newstate)

• Both of the above statements return the current pause state.
• Moreover, if newstate is equal to either on or off, it set the pause state to newstate:
State Description
on Calling pause or pause(n) will pause the execution of the currently running program.
off Calling pause or pause(n) will have no effect.
query Return the current pause state.

Note

When the execution is paused, the navigation bar title and appearance of the "Run" button change, as shown in the following image. User can tap "Continue" to resume execution.