forever

Used in a repeat loop control structure to specify that the loop should repeat until halted by an exit repeat.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

forever

# Examples

repeat forever

# Description

Use the forever keyword to repeat until an exit repeat statement within the loop explicitly ends the loop or until the heat death of the universe, whichever comes first.

All forms of the repeat control structure that test for a condition, test at the top of the loop (before each iteration). If you want to test at the bottom of the loop, use the forever keyword, and use a conditional exit repeat at the bottom of the loop:

repeat forever -- statements here if myCondition is true then exit repeat end repeat

# Tags

# See

- **keyword:** until, while - **glossary:** keyword, conditional, statement, loop, iteration, control structure - **control structure:** exit repeat, repeat