Why declare an intrinsic function after IMPLICIT NONE?

Hi!

My program (of course) has the “IMPLICIT NONE” statement straight after the USE statements. I want to use the error-function. No problem: it is an intrinsic fortran function. I just found out that the intrinsic function ERF only works when I explicitly declare it!

Why?

None of the F77 compilers I used in the past worked like that.
I get the impression that this “feature” is undesired.

Ciao,

Arjan
E-mail: arjan.van.dijk@RIVM.nl

I’m pretty sure that ERF is not a standard Fortran function. It may have been provided as extensions to other compilers.

Hi Arjan,

Chris is correct that ERF is not a Fortran intrinsic. Rather, it’s a C99 function so does need to be declared before it’s used.

  • Mat

okay