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

The shape matching rules of actual arguments and dummy arguments have been violated

steve_konarski
Beginner
2,323 Views
In a fortran subroutine, I am trying to use the text function getcharabcwidthsfloat.
The call to the command is
getcharabcwidthsfloat(hdc,1,ntv,ABC)
and I get the compiler error The shape matching rules of actual arguments and dummy arguments have been violated. [ABC]
At the top of the subroutine i have
use dfwinty
use gdi32
and define ABC to be of type T_ABCFLOAT
type (T_ABCFLOAT) ABC(0:255)
Any suggestions to why the compilation failed
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
2,323 Views
Just use ABC(1) the last argument of GetCharABCWidthsFloat is (automatically but possibly incorrectly) traslated as a scalar to Fortran. Since it's a "assumed-size" array anyway, ABC(1) will do.
0 Kudos
steve_konarski
Beginner
2,323 Views
Brilliant - thanks
0 Kudos
Reply