While ... Wend Statement
Executes a series of statements when the specified condition is True .
While condition
;Version [statements]
Wend
Parameters
Condition
A numeric or string expression that evaluates to True or False. If condition is Null, the condition is treated as False.
Statements
One or more statements that are executed when the condition is True .
Description
If condition is True, statements before all Wend statements in statements are executed, and control is returned to while< /c13> statement, and double-check condition. If condition is still True, repeat the procedure above. If not True, the program continues execution from the statement following the wend statement.
While ... Wend loops can be multiple nested structures. Each wend corresponds to the nearest while statement.
Attention Do ... The Loop statement provides a more structured and adaptable way to execute loops.
The following example illustrates how to use a while ... Wend Statement:
Dim CounterCounter = 0 'Initializes the variable. While Counter < 20 ' the value of the test counter. Counter = Counter + 1 increase the counter. Alert Counter Wend ' terminates a loop when the counter is greater than.
Requirements
Version 1