reset Subroutine

private subroutine reset(this)

Arguments

Type IntentOptional AttributesName
class(iterator), intent(inout) :: this

Description

Resets the position of the iterator to the start, so it is as though the next routine has never been called.


Source Code

  subroutine reset(this)
    !* Author: Chris MacMackin
    !  Date: March 2016
    !
    ! Resets the position of the iterator to the start, so it is as
    ! though the [[iterator(type):next(bound)]] routine has never been
    ! called.
    !
    class(iterator), intent(inout) :: this
    this%location = 1
  end subroutine reset