pointer_view_d Function

private function pointer_view_d(original, lb, ub) result(view)

Returns a pointer with different bounds.

Arguments

Type IntentOptional Attributes Name
real(kind=real_8), DIMENSION(:), POINTER :: original

original data pointer new pointer

integer, intent(in) :: lb

lower and upper bound for the new pointer view lower and upper bound for the new pointer view

integer, intent(in) :: ub

lower and upper bound for the new pointer view lower and upper bound for the new pointer view

Return Value real(kind=real_8), DIMENSION(:), POINTER

original data pointer new pointer


Source Code

      FUNCTION pointer_view_d (original, lb, ub) RESULT(view)
     !! Returns a pointer with different bounds.

         REAL(kind=real_8), DIMENSION(:), POINTER :: original, view
        !! original data pointer
        !! new pointer
         INTEGER, INTENT(IN)                  :: lb, ub
        !! lower and upper bound for the new pointer view
        !! lower and upper bound for the new pointer view
         view => original(lb:ub)
      END FUNCTION pointer_view_d