Returns a pointer with different bounds.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
original data pointer new pointer
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