Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

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

davidgraham
Beginner
724 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
724 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
724 Views
Arjen,
Thanks, I added them to a module and it worked fine.
David
0 Kudos
Arjen_Markus
Honored Contributor II
724 Views
You're welcome

Regards,

Arjen
0 Kudos
Reply