(j3.2006) PURE function vs subroutine

Bill Long longb
Wed Mar 4 12:20:46 EST 2015


A function returns a value.  The only way to get something back from a pure subroutine is through one of the arguments.

Cheers,
Bill

On Mar 4, 2015, at 11:14 AM, Daniel C Chen <cdchen at ca.ibm.com> wrote:

> Hello,
> 
> Can someone shed light on why a nonpointer dummy argument of a pure function that is not VALUE must be INTENT(IN) where such a dummy argument of a pure subroutine can be INTENT(OUT)/INTENT(INOUT)?
> 
> Thanks,
> 
> Daniel
> 
> XL Fortran Development - IBM Toronto Software Lab
> Phone: 905-413-3056   
> Tie: 969-3056   
> Email: cdchen at ca.ibm.com
> http://www.ibm.com/software/awdtools/fortran/xlfortran
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

Bill Long                                                                       longb at cray.com
Fortran Technical Suport  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the J3 mailing list