Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(container), | intent(in), | dimension(:) | :: | contents |
Creates an iterator from an array of containers containing the data to be returned upon iteration. The data is returned starting with the first element of the array and ending with the last.
pure function constructor(contents) result(new)
!* Author: Chris MacMackin
! Date: March 2016
!
! Creates an iterator from an array of containers containing
! the data to be returned upon iteration. The data is returned
! starting with the first element of the array and ending with
! the last.
!
class(container), dimension(:), intent(in) :: contents
type(iterator) :: new
allocate(new%contents(size(contents)), source=contents)
new%filled = .true.
end function constructor