Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(array_list), | intent(in) | :: | this | |||
class(*), | intent(in) | :: | item |
Positions of the all occurrences of item
in list. Unallocated
if item
not present.
Returns an array containing the indices of all occurrences of the item in the list. If there are no occurrences, then returns an unallocated array.
pure function array_list_get_indices(this, item)
!* Author: Chris MacMackin
! Date: March 2016
!
! Returns an array containing the indices of all occurrences of the
! item in the list. If there are no occurrences, then returns an
! unallocated array.
!
class(array_list), intent(in) :: this
class(*), intent(in) :: item
integer, dimension(:), allocatable :: array_list_get_indices
!! Positions of the all occurrences of `item` in list. Unallocated
!! if `item` not present.
end function array_list_get_indices