|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.upb.hni.vmagic.VhdlElement
de.upb.hni.vmagic.LabeledElement
de.upb.hni.vmagic.statement.SequentialStatement
de.upb.hni.vmagic.statement.LoopStatement
de.upb.hni.vmagic.statement.WhileStatement
public class WhileStatement
While loop.
Variable i = new Variable("i", Standard.INTEGER, new DecimalLiteral(0)); Expression condition = new LessThan(i, new DecimalLiteral(100)); WhileStatement loop = new WhileStatement(condition); loop.getStatements().add(new ReportStatement("loop")); Expression addExpression = new Add(i, new DecimalLiteral(1)); loop.getStatements().add(new VariableAssignment(i, addExpression));
while i < 100 loop report "loop"; i := i + 1; end loop;
Constructor Summary | |
---|---|
WhileStatement(Expression condition)
Creates a while loop. |
Method Summary | |
---|---|
Expression |
getCondition()
Returns the condition. |
void |
setCondition(Expression condition)
Sets the condition. |
Methods inherited from class de.upb.hni.vmagic.statement.LoopStatement |
---|
getScope, getStatements |
Methods inherited from class de.upb.hni.vmagic.statement.SequentialStatement |
---|
getLabel, setLabel |
Methods inherited from class de.upb.hni.vmagic.VhdlElement |
---|
getParent, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WhileStatement(Expression condition)
condition
- the while conditionMethod Detail |
---|
public Expression getCondition()
public void setCondition(Expression condition)
condition
- the condition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |