3. Statements : OpenROAD Language Statements : While Statement
 
Share this page                  
While Statement
This statement repeats a series of statements while a specified condition is true.
This statement has the following syntax:
[label:] while condition do
               statementlist
         endwhile;
The while statement, also called the while loop, executes the series of statements between the do and endwhile keywords as long as the specified condition remains true. The condition expression is tested only at the start of each iteration of the loop. Consequently, if values change during execution of the loop so as to make the condition false, execution still continues through the current iteration of the statement list unless the program encounters an endloop or continue statement.
You can nest while statements in OpenROAD.