pointer_view_i Function

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

Returns a pointer with different bounds.

Arguments

TypeIntentOptionalAttributesName
integer(kind=int_4), 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_4),DIMENSION(:),POINTER

original data pointer new pointer


Contents

Source Code


Source Code

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

         INTEGER(kind=int_4), 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_i