diff Function

public pure function diff(ivals) result(idiff)

Difference ip vector

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in), dimension(:) :: ivals

Return Value integer(kind=ip), dimension(:), allocatable


Source Code

    pure function diff(ivals) result(idiff)
        integer(ip),dimension(:),intent(in) :: ivals
        integer(ip),dimension(:),allocatable :: idiff
        integer :: i !! counter
        idiff = [(ivals(i+1) - ivals(i), i = 1, size(ivals)-1)]
    end function diff