array_list_sort Subroutine

private subroutine array_list_sort(this, comparison)

Arguments

Type IntentOptional AttributesName
class(array_list), intent(inout) :: this
procedure(comparison_func) :: comparison

A procedure which evaluates whether a container object is less than, equal to, or greater than another

Description

Sorts the list, in place, so that all items are in ascending order according the the provided comparison function.


Source Code

  subroutine array_list_sort(this, comparison)
    !* Author: Chris MacMackin
    !  Date: March 2016
    !
    ! Sorts the list, in place, so that all items are in ascending order
    ! according the the provided comparison function.
    !
    class(array_list), intent(inout) :: this
    procedure(comparison_func) :: comparison
      !! A procedure which evaluates whether a [[container]] object is
      !! less than, equal to, or greater than another
  end subroutine array_list_sort