Simulation Command Reference : Rational Statemate Actions : WHILE

WHILE

The WHILE statement is used to execute SCL statements in a loop.

Syntax:

while condition

loop

statement [ ; statement . . . ]

end loop

 

 

where condition is any Boolean expression and Statement is any SCL statement.
The WHILE/LOOP statement is used to execute SCL statements in a loop. The condition is any Boolean expression. While the condition is true, the statements in the loop are performed repeatedly. The condition is rechecked prior to each execution of the loop.
There is no limit to the depth of structured statements within the loop.
Example:
WHILE cax
LOOP
a1; a2
if x = 3, then fs!(cax)
else
write(“not tripped”);
while Cb or cq
loop
a3
end loop
end if
end loop