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

The type of the actual argument differs from the type of the dummy argument

davidgraham
Beginner
723 Views
I'm getting the following error - I cannot see why as the definitions look the same.

Error 1 error #6633: The type of the actual argument differs from the type of the dummy argument. [PT]

The definition of the subroutine is as follows - I have only included part of it as the problem is with 'pt'.

subroutine TriSlopeSym (sym,pt,X4,Y4,Z4,sfx,brgsym)

type enhType
integer*4 e,n,h
end type

type (enhType) pt(3)

The definition of the call is as follows - I have only included part of the code

type enhType
integer*4 e,n,h
end type

type (enhType) pt(3)

call TriSlopeSym (sym,pt,X4,Y4,Z4,sfx,brgsym)


0 Kudos
3 Replies
Arjen_Markus
Honored Contributor II
723 Views

It looks as if you have literally repeated the definition of the enhType derived type. The Fortran standard dictates that these are nevertheless to be considered two _different_ types. Hence the message.

What you should do is put the definition of enhType in a module that you use anywhere that you have such variables.

Regards,

Arjen

0 Kudos
davidgraham
Beginner
723 Views
Arjen,
Thanks, I added them to a module and it worked fine.
David
0 Kudos
Arjen_Markus
Honored Contributor II
723 Views
You're welcome

Regards,

Arjen
0 Kudos
Reply