Remove frame from list(1:n); false if it is not in it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(FramePointer), | intent(inout), | allocatable | :: | list(:) |
first n used |
|
| integer, | intent(inout) | :: | n |
number of frames in list (decremented if removed) |
||
| class(ReferenceFrame), | intent(in), | target | :: | frame |
the frame to remove |
logical function remove(list, n, frame) type(FramePointer), allocatable, intent(inout) :: list(:) !! first n used integer, intent(inout) :: n !! number of frames in list (decremented if removed) class(ReferenceFrame), intent(in), target :: frame !! the frame to remove integer :: k k = find(list, n, frame) remove = k > 0 if (.not. remove) return list(k:n-1) = list(k+1:n) list(n)%p => null() n = n - 1 end function remove