Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Why won't this routine compile?

WSinc
New Contributor I
522 Views

For Line 50 it tells me "this (Q) has already been used as a dummy function name (Error 6429).

Q is just a dummy output argument.

Why would it think otherwise?

0 Kudos
4 Replies
Steven_L_Intel1
Employee
522 Views
In line 21 you reference Q(1). Since you did not declare Q as an array, that means it's a function call. Later, when you try to assign to Q, you can't assign to a function name.
0 Kudos
WSinc
New Contributor I
522 Views

Didn't it used to be we had to use an EXTERNAL statement for those types of variables?

Did they change the standard recently?

0 Kudos
TimP
Honored Contributor III
522 Views

If you had set IMPLICIT NONE, and didn't provide an INTERFACE or some other declaration, EXTERNAL might have helped, but we don't know if this was intentional or a typo.

Some new aspects of EXTERNAL in Fortran 2003 were interpreted incorrectly in some early implementations, but that seems to have no relevance to this example.

The example doesn't conform to any standard version of Fortran; it mixes some extensions to F77 and F90, so it appears to go out on a limb as far as compatibility is concerned.

0 Kudos
Steven_L_Intel1
Employee
522 Views
Nothing related to this issue changed in the standard. The code as you have it would fail to build in Fortran 77. EXTERNAL is required only if you are passing a name as an argument.
0 Kudos
Reply