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

how to pass complex array to dummy argument of REAL array type?

geotarget
Beginner
686 Views

how to pass actual argument of complex to a dummy argument of type REAL in windows

intel fortran

following code compiled and runs OK on Linux but won't compile in Windows intel fortran!

intel visual fortran compiler error message:

Error: The type of the actual argument differs from the type of the dummy argument. [TEMP]

//////////////////////

COMPLEX

TEMP(*)

...

CALL

MYTEX (TEMP, 2, N1, SIGN, INIT, TAB1, IERR)

which was defined as

SUBROUTINE

MYTEX (C, IC, N, IDIR, INIT, RTAB, IERR)

REAL C(1);

REAL RTAB(1);

INTEGER IC, N, IDIR, INIT, IERR, NFFT, NT

/////////////////////////////////////////////////////////////////////////////////////////////////////////

0 Kudos
3 Replies
TimP
Honored Contributor III
686 Views
It's not a question of linux vs Windows, but whether you prevent the compiler from performing any checking of arguments. In addition to type spoofing, you are mixing the idiom in use prior to 30 years ago of using array length argument (1) with the (*) form which was the standard for over 10 years from then, and remains acceptable. So, you should undertake some combination of correcting the code and turning off checking. Unless you have a reason for using on non-standard code, why not simply fix it?
0 Kudos
geotarget
Beginner
686 Views

Thnaks, Tim18

how do you specify visual fortran to turn off checking when compiling, I am not good

on this visual thing and it just happen to need a quick test of old unix fortran code .

0 Kudos
geotarget
Beginner
686 Views

Thnaks. I turn off the flag and Visual fortran and now is compiled and linked.

I am running it....

Thanks. Tim18

0 Kudos
Reply