pointer_view_c Function

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

Returns a pointer with different bounds.

Arguments

Type IntentOptional Attributes Name
complex(kind=real_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 complex(kind=real_4), DIMENSION(:), POINTER

original data pointer new pointer


Source Code

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

         COMPLEX(kind=real_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_c