{"identifier":28298,"topic":"Keywords","name":"repeat while","text":"<code>repeat while <i>trueOrFalse<\/i><\/code> <code><pre>   <i>statements<\/i>\nend repeat\n<\/pre><\/code>\nThe statements in a <code>repeat while<\/code> structure repeat as long as the condition following the word<code> while <\/code>is true. HyperCard checks the condition before the first and any subsequent iterations of the loop. <br><br>\n\n If HyperCard executes an<code> exit repeat <\/code>statement in the<code> <\/code>loop, it continues running the handler starting from the first statement after<code> end repeat<\/code>. <br>\n<br>\nIf HyperCard executes a<code> next repeat <\/code>statement, it returns immediately to the beginning of the<code> repeat <\/code>loop. <br>\n","related":{"89783":"Comparison operators","25835":"exit","90049":"Logical operators","27427":"repeat","27895":"repeat for","28073":"repeat until","28477":"repeat with","6157":"Type and existence operators"},"examples":"","demo":"on mouseUp\n   show bkgnd field \"demo field\"\n   put return & \"    Press the mouse to stop counting...\" \u00ac\n   into bkgnd field \"demo field\"\n   put 0 into theCount\n   put space & space & theCount after bkgnd field \"demo field\"\n  <b> repeat while<\/b> the mouse is up\n     add 1 to theCount\n     put theCount into last word of bkgnd field \"demo field\"\n   <b>end repeat<\/b>\n   wait 20\n   hide bkgnd field \"demo field\"\n   put empty into bkgnd field \"demo field\"\n end mouseUp\n ","debug":{"9":["repeat while trueOrF"],"10":["If HyperCard execute"]}}