array_list_get_last_index Function

private pure function array_list_get_last_index(this, item)

Arguments

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

Return Value integer

Position of the last occurrence of item in list. -1 if item not present

Description

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


Source Code

  pure function array_list_get_last_index(this, item)
    !* Author: Chris MacMackin
    !  Date: March 2016
    !
    ! Returns the index of the last 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_last_index
      !! Position of the last occurrence of `item` in list. -1 if `item`
      !! not present
  end function array_list_get_last_index