pointer_view_l Function

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

Returns a pointer with different bounds.

Arguments

Type IntentOptional Attributes Name
integer(kind=int_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 integer(kind=int_8), DIMENSION(:), POINTER

original data pointer new pointer


Source Code

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

         INTEGER(kind=int_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_l