array_list_get_indices Function

private pure function array_list_get_indices(this, item)

Arguments

Type IntentOptional AttributesName
class(array_list), intent(in) :: this
class(*), intent(in) :: item

Return Value integer, dimension(:),allocatable

Positions of the all occurrences of item in list. Unallocated if item not present.

Description

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.


Source Code

  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