array_list_get_index Function

private pure function array_list_get_index(this, item)

Arguments

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

Return Value integer

Position of the first occurrence of item in list

Description

Returns the index of the first occurrence of the item in the list. If there are no occurrences, then returns -1.


Source Code

  pure function array_list_get_index(this, item)
    !* Author: Chris MacMackin
    !  Date: March 2016
    !
    ! Returns the index of the first occurrence of the item in the list.
    ! If there are no occurrences, then returns -1.
    !
    class(array_list), intent(in) :: this
    class(*), intent(in) :: item
    integer :: array_list_get_index
      !! Position of the first occurrence of `item` in list
  end function array_list_get_index