3. Statements : OpenROAD Language Statements : For Statement
 
Share this page                  
For Statement
This statement repeats a series of statements, incrementing or decrementing an index variable.
This statement has the following syntax:
[label:] for indexvariable = startexpression
                    to|downto endexpression
                    do statementlist
        endfor;
The for statement, also called the for loop, repetitively executes the series of statements in the statementlist between the do and endfor keywords. The specified indexvariable is incremented (if to is specified) or decremented (if downto is specified) after each iteration of the series of statements. The series of statements is executed until the indexvariable exceeds (to) or becomes less than (downto) the specified endexpression. This test is performed before each iteration (thus, it is possible for no iterations to be executed). The specified endexpression is re-evaluated for each test.
Note:  You can nest for statements in OpenROAD.