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

Type of argument differs from ...

babe59
Beginner
332 Views

Hello,

I saw other post that treat about this error message but I think that is not resolve my problem (or I don't handerstand).

My Error message : "Error : The type of the actual argument differs from the type of the dummy argument [PARAM]."
Must I set compiler option ?

I user Compiler Fortran for Windows on VS2005

Here My Source code

In TOT.DEF modul:
type, bind(C) :: inoutG
REAL*4 H
REAL*4 B
...
end type inoutG

In G.FOR modul
SUBROUTINE PTD (param) BIND(C, NAME="PTD")
use, intrinsic :: ISO_C_BINDING
INCLUDE'TOT.DEF'
type(inoutG), intent(inout) :: param

CALL INIT_INPUT(param) // Error here
...
END

SUBROUTINE INIT_INPUT (param)
use, intrinsic :: ISO_C_BINDING
INCLUDE 'TOT.DEF'
type(inoutG), intent(inout) :: param

H = param%H
B = param%B
...
END

0 Kudos
1 Reply
Steven_L_Intel1
Employee
332 Views

This code is not legal Fortran but it would tend to work if it were not for the compiler's discovering the error. My advice is to move the definition of the derived type inoutG to a module and USE the module. Then it will be happy.

The alternative is to turn off interface checking on the project's Fortran Diagnostics property page.

0 Kudos
Reply