Class FOR_SingleTValElt

java.lang.Object
simula.runtime.FOR_Element
simula.runtime.FOR_SingleTValElt
All Implemented Interfaces:
Iterator<Boolean>

public final class FOR_SingleTValElt extends FOR_Element

For-statement single text value element.

		For t:=  // Text Value Assignment
  • Field Details

  • Constructor Details

    • FOR_SingleTValElt

      public FOR_SingleTValElt(RTS_NAME<RTS_TXT> cvar, RTS_NAME<RTS_TXT> tval)
      Create single text value element.
      Parameters:
      cvar - the for-statement control variable
      tval - the text value expression
  • Method Details

    • hasNext

      public boolean hasNext()
      Returns true if the iteration has more elements.
      Specified by:
      hasNext in interface Iterator<Boolean>
      Overrides:
      hasNext in class FOR_Element
      Returns:
      true if the iteration has more elements
    • next

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