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

Call a subroutine

timberwolf
Beginner
528 Views
I have code in Visual Fortran V6.6 with a call to a subroutine which was written in f77.

for example: Call test(arguement1,arguement2, &
arguement3)

in different a file the f77 code:
Subroutine test(arguement1,arguement2
> arguement3)


When compile, it no problem, but excute it gives a link error.

How would I get around this problem?
thanks.
0 Kudos
2 Replies
Intel_C_Intel
Employee
528 Views
The link step checks the length of all the arguments combined. If you are sure you have the same number of arguments, I would double check and make sure each are of the same type. For example, Real versus double.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
528 Views
A common hack in the good ol' days was to match a CHARACTER to a BYTE dummy or vice versa:

call sub("foo")
...
subroutine sub(str)
byte str(*)

That's illegal, but rather frequent. That won't pass on CVF (and that's the primary reason they're retreating to C/by reference/string length at the end of arg-list in IF8).

If there's e.g. double vs. real mismatch, it should be swallowed by the linker -- although the run-time results will be garbage.

Jugoslav
0 Kudos
Reply