Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

The number of actual arguments cannot be greater than the number of dummy arguments

$
0
0

The following code is giving the compile-time error #6784: The number of actual arguments cannot be greater than the number of dummy arguments.

SOURCE1.f

CHARACTER*4 Mode

INTEGER Iflag

REAL(1000) a

INTEGER b

REAL*8, DIMENSION(1:302) :: c

REAL*8, DIMENSION(1:300) :: d

...

call prog_in(Mode,Iflag,a,b,c,d)

SOURCE2.f

subroutine prog_in(mode,iflag,a,b,c,d)

CHARACTER*4 Mode

INTEGER Iflag

REAL(1000) a

INTEGER b

REAL*8, DIMENSION(1:302) :: c

REAL*8, DIMENSION(1:300) :: d

I know that Fortran by default passes the length of character arguments at the end of the argument list. For this project however, this is changed such that Fortran passes the length of character arguments immediately after the individual string arguments.

I tried to insert an additional argument in the SOURCE2 definition:

subroutine prog_in(mode,modelen,iflag,a,b,c,d)

INTEGER modelen

But I still get the same compile-time error.

Any thoughts?


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>