reset Subroutine

private elemental subroutine reset(this, k)

Reset the iterator

If k is not present, the iterator is reset to the beginning. If k is present, it has to be smaller 0 and resets the iterator by this amount of steps. In particular call tokens%reset(-1) resets the iterator one element and allows to reread the previous element.

Type Bound

TokenIterator_t

Arguments

Type IntentOptional Attributes Name
class(TokenIterator_t), intent(inout) :: this
integer, intent(in), optional :: k

Contents