PURE SUBROUTINE G(x,y,z) IMPLICIT NONE REAL, INTENT(OUT), DIMENSION(:) :: z REAL, INTENT(IN), DIMENSION(:) :: x, y INTEGER i INTERFACE REAL FUNCTION F(x,y) REAL, INTENT(IN) :: x, y END FUNCTION F END INTERFACE ! ... FORALL(i=1:SIZE(z)) z(i) = F(x(i),y(i)) END SUBROUTINE G
Note:
Example of use,
CALL G(x,y,res)
For more information, click here