I don't need to test my programs. I have an error-correcting modem.
While loop
From Unreal Wiki, The Unreal Engine Documentation Site
(Redirected from While)
The while loop is a basic loop statement in UnrealScript, similar to the for loop and the do...until loop.
[edit] Syntax
The while loop syntax is very similar to that of the if statement:
while (condition) {
...
}
The condition must be a bool type expression. The code between the parentheses is executed repeatedly until either the condition becomes False or a break statement is encountered.
Similar to the if statement, a while loop can be used to repeat a single statement instead of a block of code:
while (condition) statement;
This notation should be used with care because the statement could be the empty statement (a single semicolon), which would mean the loop only repeatedly evaluates its condition.
| Declarations | Classes • Interfaces • Variables • Enums • Structs • Constants • Functions • Operators • Delegates • States • Defaultproperties • Subobjects |
|---|---|
| Types | bool • byte • float • int • name • string • Object • Enums • Structs (Vector ⋅ Rotator) • Static arrays • Dynamic arrays • Delegates • Typecasting |
| Literals | Boolean • Float • Integer • Names • Objects • Vectors • Rotators • Strings |
| Flow control | Break statement • Continue statement • Do loop • For loop • ForEach loop • GoTo statement • If statement • Return statement • Stop statement • Switch statement • While loop |
