The main documentation of the Get_Values_Distributed_Vector Procedure contains additional explanation of this code listing.
define([GET_VALUES_ROUTINE],[ pushdef([DIM], [$1]) pushdef([Get_Values_Distributed_Vector_DIM], expand(Get_Values_Distributed_Vector_DIM)) subroutine Get_Values_Distributed_Vector_DIM (Values, DV) ! Input variable. type(Distributed_Vector_type), intent(in) :: DV ! Variable to be queried. ! Input/Output variable. type(real,DIM,np), intent(inout) :: Values ! Values bare naked vector. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! Verify requirements. VERIFY(Valid_State(DV),5) ! DV is valid. VERIFY(Valid_State_NP(Values),5) ! Values is valid. VERIFY(SHAPE(Values) == SHAPE(DV%Values$1),5) ! Values shape check. VERIFY($1 == DV%Dimensionality,5) ! DV has been set up for this call. ! Get the value. Values = DV%Values$1 ! Verify guarantees. VERIFY(Valid_State(DV),5) ! DV is still valid. return end subroutine Get_Values_Distributed_Vector_DIM popdef([DIM]) popdef([Get_Values_Distributed_Vector_DIM]) ]) forloop([Dim],[1],[4],[ GET_VALUES_ROUTINE(Dim) ])