While Command

Description:

The while statement lets you repeat a statement or compound statement until a specified expression becomes false.

Format:

While (condition)
    statements
Endwhile

Parameters:

condition

An integer expression evaluated each time the loops execute. If the condition is evaluated to zero, the Script control passes to the Endwhile and the loop terminates.

Example:

integer i;

i = 10;
While ( i >= 5 )
    log "i = " + ToString(i);
    i = i -1;
Endwhile

Output:

i = 10
i = 9
i = 8
i = 7
i = 6
i = 5





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap