Silverfrost Forums

Welcome to our forums

2 compiler errors in CHARACTER functions

6 Feb 2007 7:33 #1615

hi,

when compiling the following (simplified) modules, 2 spurious errors are reported by FTN95:

  1. Line 22, error 327 - In the INTERFACE to AFUNC1, the third dummy argument (A) was of type REAL(KIND=1), whereas the actual argument is of type INTEGER(KIND=3)

this is clearly erroneous, as the interfaces are correct. Indeed, a is the fist, not third, dummy argument.

  1. Line 45, error 326 - FUNCTION BFUNC1 has been called with too few arguments.

again, a quick inspection shows the interfaces are correct.

these compiler errors occur only if the functions are of CHARACTER type. Has anybody else come across such errors?

ps - I run FTN95 from .NET2003. it appears these errors only occur when using Debug/Checkmate with .NET, but not Win32. Quite strange.

!======================== module amod implicit none contains !--------------------------------------- function afunc1(a,b,c) implicit none real,intent(in)::a real,intent(in)::b integer,intent(in)c characterafunc1 ! the error occurs whether or not a,b,c are actually used write(afunc1,'(f9.2,i2)')a+b,c endfunction afunc1 !--------------------------------------- function afunc2(a,b,c) implicit none real,intent(in)::a real,intent(in)::b integer,intent(in)c characterafunc2 afunc2=afunc1(a,b,c) endfunction afunc2 !--------------------------------------- endmodule amod !======================== module bmod implicit none contains !--------------------------------------- function bfunc1(a,c) implicit none real,intent(in)::a integer,intent(in)c characterbfunc1 ! the error occurs whether or not a,c are actually used write(bfunc1,'(f9.2,i2)')a,c endfunction bfunc1 !--------------------------------------- function bfunc2(a,c) implicit none real,intent(in)::a integer,intent(in)c characterbfunc2 bfunc2=bfunc1(a,c) endfunction bfunc2 !--------------------------------------- endmodule bmod !========================

7 Feb 2007 9:43 #1625

I have logged this as something to investigate.

Please login to reply.