## Repeat Forever

This statement allows you to repeat an inline action indefinitely. The statement is valid in all execution contexts. However, unlike all other statements which run actions, this statement cannot be used to change the execution mode from stepwise to grouped. If you were running stepwise the repeated action will be run stepwise. If you were running grouped the repeated action will be run grouped.

This statement is extremely dangerous! You must manually stop the action from executing by an Exit Repeat statement, one of the Stop statements or by cancelling via the UI. If you elect to Cancel from the UI while not running in batch processing mode, it can take five seconds or more before the cancel request is acted on.

Note that a Restart Repeat Forever statement can be used to essentially restart the statement.

You can use this statement and a Restart Repeat Forever to set up a well known location to restart execution, regardless as to have many actions are currently being executed.

Example:

- Set named variable 'Restarting' to "0"
- Repeat Forever Restart Point
- ... Was Restarted is 1 or 0
- Start Restart Point
- Test if the numeric value of named variable 'Restarting' != 0 (Set result)
- if true
- - Set named variable 'Was Restarted' to "1"
- else
- - Set named variable 'Restarting' to "1"
  - Run action 'Main Work Action'
  - Set named variable 'Was Restarted' to "0"
- endif
- Exit Repeat