Class FOR_WhileElt<T>

java.lang.Object
simula.runtime.FOR_Element
simula.runtime.FOR_WhileElt<T>
Type Parameters:
T - the type of this element
All Implemented Interfaces:
Iterator<Boolean>

public final class FOR_WhileElt<T> extends FOR_Element

For-statement While element, not text

		For i:=  while 
  • Field Details

    • cvar

      final RTS_NAME<T> cvar
      The for-statement control variable.
    • expr

      final RTS_NAME<T> expr
      A Value expression.
    • cond

      The condition that determines whether to continue.
  • Constructor Details

    • FOR_WhileElt

      public FOR_WhileElt(RTS_NAME<T> cvar, RTS_NAME<T> expr, RTS_NAME<Boolean> cond)
      Create While element.
      Parameters:
      cvar - the for-statement control variable
      expr - a Value expression
      cond - a Boolean exppression
  • Method Details

    • next

      public Boolean next()
      Update the control variable with the next value if any.
      Returns:
      true if the control variable was updated; otherwise false.