The format is:
while ( Conditional-expression )
If the conditional expression meets the condition, the statement in the while statement is executed from the beginning. If does not meet the condition, execution moves to the next of the endwhile.
If the execution reached "continue" or "endwhile", execution moves to the conditional expression and resumes the loop from the evaluating.
If the execution reached "break", execution moves to the next of the endwhile.
A keyword that indicates that it is a while statement.
There are two type expressions that can use as a condition.
An expression that returns a bool class.
An expression that returns a number: int, long, and real class.
When it is a bool, the loop is executed if it is true.
When it is a number, the loop is executed if it is not zero.
The conditional expression is re-evaluated per loop. Therefore, the restart position of the while loop is a conditional expression.
proxy pro = new proxy(true);
while(pro) // pro.Entity is used.
The entity of the proxy must be a bool class or a number.
The while statement generates a scope.
Variables declared in the scope are re-declared per loop and new instances are assigned.
It does not carry over the value of the previous loop to the next loop.
When execution reaches the while, a scope is generated. Then, reserved variables __count and __index are defined.
They are a variable of the int class and are initialized with the number of loops starting from zero.
They do not cause an overflow. If exceed the maximum value of the int, automatically return to zero.
The scope has already been generated when evaluating the conditional expression. Therefore, if you use a reserved variable in a conditional expression, it is the one defined by the current while statement.
Statements within a while statement are optional. You can place statements as many as you want.
This is a keyword that indicates the end of the while statement.
You can use the abbreviation "ew" instead of "endwhile". Note that "ew" is also a keyword.
open method void someMethod()
if (__count > 10)