GM: do
From GMpedia.org Wiki
|
do...until | |
| Type: | statement |
| Limitations: | none |
- The correct title of this article is do...until(expression). It appears incorrectly here because of technical restrictions.
do
{
coding;
}
until (expression)
First the block will be executed, then if expression is false, the block is executed again. The do statement executes the block until expression is true. It is easy again to get into an infinite loop with the do statement, you need to have a variable in the until expression, and will have to change the variable in the block. You must have an until for every do, and the block will be executed at least once before checking expression.
[edit] Example
do {
timer -= 1;
// coding goes here that will repeat until time = 0;
}
until (timer < 0)
[edit] See Also
This article was originally found at the Game Maker Knowledge Base, contributed by Abyssal_Nuclei.
See the talk page for details
See the talk page for details

