|
THE HYPERCARD CENTER |
|
|
Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
repeat until
repeat until trueOrFalse
statements
end repeat
The statements in a repeat until structure repeat as long as the condition following the word until is false. HyperCard checks the condition before the first and any subsequent iterations of the loop.
If HyperCard executes an exit repeat statement in the loop, it continues running the handler starting from the first statement after end repeat .
If HyperCard executes a next repeat statement, it returns immediately to the beginning of the repeat loop.
Demo Script
on mouseUp
show bkgnd field "demo field"
put return & " Point at the number to stop counting..." ¬
into bkgnd field "demo field"
put 0 into theCount
put space & space & theCount after bkgnd field "demo field"
repeat until the mouseLoc is within "321,81,370,110"
add 1 to theCount
put theCount into last word of bkgnd field "demo field"
if theCount = 100 then exit repeat -- just in case.
end repeat
wait 20
hide bkgnd field "demo field"
put empty into bkgnd field "demo field"
end mouseUp
Placeholders
trueOrFalse
Any expression that evaluates to the HyperTalk and AppleScript constants true or false .
For example:
true
false
the hilite of bg btn "Yes"
fld "Zip" contains "95014"
the short name of this stack is "Fred"
statements
Any return-separated list of built-in commands, user-defined handlers, or keywords that are part of a message or function handler.
put "Hello world" -- built-in command
get total(field 1) -- function call
global HelpInfo -- keyword
Related Topics
« repeat for | HyperTalk Reference
| repeat while »
|