<doc>
  <legacy_id>1275</legacy_id>
  <name>forever</name>
  <type>keyword</type>
  <syntax>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
  </classification>
  <references>
    <keyword tag="while">while Keyword</keyword>
    <keyword tag="until">until Keyword</keyword>
    <control_st tag="repeat">repeat Control Structure</control_st>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Used in a <control_st tag="repeat">repeat</control_st> <glossary tag="loop">loop</glossary> <glossary tag="control structure">structure</glossary> to specify that the <glossary tag="loop">loop</glossary> should repeat until halted by an <control_st tag="exit repeat">exit repeat</control_st>.</summary>
  <examples>
    <example>repeat forever</example>
  </examples>
  <description>
    <p>Use the <b>forever</b> <glossary tag="keyword">keyword</glossary> to repeat until an <control_st tag="exit repeat">exit repeat</control_st> <glossary tag="statement">statement</glossary> within the <glossary tag="loop">loop</glossary> explicitly ends the <glossary tag="loop">loop</glossary> or until the heat death of the universe, whichever comes first.</p><p/><p><b>Comments:</b></p><p>All forms of the <b>repeat</b> <glossary tag="control structure">control structure</glossary> that test for a condition, test at the top of the <glossary tag="loop">loop</glossary> (before each <glossary tag="iteration">iteration</glossary>). If you want to test at the bottom of the <glossary tag="loop">loop</glossary>, use the <b>forever</b> <glossary tag="keyword">keyword</glossary>, and use a <glossary tag="conditional">conditional</glossary> <control_st tag="exit repeat">exit repeat</control_st> at the bottom of the <glossary tag="loop">loop</glossary>:</p><p/><p><code>  repeat forever</code></p><p><code>    </code><code><i>-- statements here</i></code></p><p><code>    if myCondition is true then exit repeat</code></p><p><code>  end repeat</code></p>
  </description>
</doc>