array_list_delete_slice Subroutine

private subroutine array_list_delete_slice(this, start_element, end_element)

Arguments

Type IntentOptional AttributesName
class(array_list), intent(inout) :: this
integer, intent(in) :: start_element

Index of the first element in the slice to be deleted

integer, intent(in) :: end_element

Index of the last element in the slice to be deleted

Description

Removes the element within the specified slice of the list, moving all succeeding items back by the number of items deleted. The slice contains the element at the start index to the end index, inclusive. Crashes if part of the slice has not been set.


Source Code

  subroutine array_list_delete_slice(this, start_element, end_element)
    !* Author: Chris MacMackin
    !  Date: March 2016
    !
    ! Removes the element within the specified slice of the list, moving
    ! all succeeding items back by the number of items deleted. The 
    ! slice contains the element at the start index to the end index,
    ! inclusive. Crashes if part of the slice has not been set.
    !
    class(array_list), intent(inout) :: this
    integer, intent(in) :: start_element
      !! Index of the first element in the slice to be deleted
    integer, intent(in) :: end_element
      !! Index of the last element in the slice to be deleted
  end subroutine array_list_delete_slice