{"identifier":28477,"topic":"Keywords","name":"repeat with","text":"<code><pre>repeat with <i>variableName<\/i> = \u00ac\n   <i>integer1<\/i> to <i>integer2<\/i>\n   <i>statements<\/i>\nend repeat\nrepeat with <i>variableName<\/i> = \u00ac\n   <i>integer1<\/i> down to <i>integer2<\/i>\n   <i>statements<\/i>\nend repeat\n<\/pre><\/code>\nThe statements in a<code> repeat with <\/code>structure repeat until a variable with an initial value of<code> <i>integer1<\/i> <\/code>is greater than (or, in the case of <code>down to<\/code>, less than) the number <i><code>integer2<\/i><\/code>. <br>\n<br>\nThe value of the variable increases (or decreases) by 1 during each iteration of the<code> repeat <\/code>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>. If HyperCard executes a<code> next repeat <\/code>statement, it returns immediately to the beginning of the<code> repeat <\/code>loop  and increases (or decreases) the value of the variable. <br>\n","related":{"89783":"Comparison operators","25835":"exit","90049":"Logical operators","27427":"repeat","27895":"repeat for","28073":"repeat until","28298":"repeat while","6157":"Type and existence operators"},"examples":"","demo":"on mouseUp\n   show bkgnd field \"demo field\"\n   put return & spaces(25) & \"Counting down to 0:  10\" \u00ac\n   into bkgnd field \"demo field\"\n   <b>repeat with<\/b> theCount = 10 down to 0\n     put theCount into last word of bkgnd field \"demo field\"\n     wait 15 ticks\n   <b>end repeat<\/b>\n   flash\n   wait 20\n   hide bkgnd field \"demo field\"\n   put empty into bkgnd field \"demo field\"\n end mouseUp\n ","debug":{"9":["repeat with variable"],"10":["The value of the var"]}}