next Function
private function next(this, item)
Arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(vector_iterator), | intent(inout) | :: | this | |||
class(*), | intent(out), | pointer | :: | item |
Return Value logical
Source Code
logical function next(this, item)
class(vector_iterator), intent(inout) :: this
class(*), pointer, intent(out) :: item
next = this%more()
if(next) then
this%current = this%current + 1
item => this%my_vector%items(this%current)%stuff
else
item => null()
end if
end function next