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

why changing subroutine name just works?

Tai_Q_
Beginner
365 Views

One subroutine is named fourn

I got errors like   error #6633 the type of the actual argument differs from the type of the dummy argument. [COEF]

COEF is the argument of subroutine fourn.

The change fourn to fourn8.

It just works.

How come?

0 Kudos
1 Reply
mecej4
Honored Contributor III
365 Views

If the compiler sees both the declaration of the subroutine and a call to it in the same source file (or if checking interfaces has been selected) it can check for matching subroutine argument types. By changing the name, you disabled this capability of the compiler. If by "It just works" you mean that the compilation completes without error messages, you are asking for trouble later (at link time or run time). Instead of trying to deceive the compiler, fix the problem.

0 Kudos
Reply