forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

2 compiler errors in CHARACTER functions

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dk



Joined: 02 Feb 2007
Posts: 6

PostPosted: Tue Feb 06, 2007 8:33 pm    Post subject: 2 compiler errors in CHARACTER functions Reply with quote

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.

2) 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
character::afunc1
! 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
character::afunc2
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
character::bfunc1
! 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
character::bfunc2
bfunc2=bfunc1(a,c)
endfunction bfunc2
!---------------------------------------
endmodule bmod
!========================
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7928
Location: Salford, UK

PostPosted: Wed Feb 07, 2007 10:43 am    Post subject: Reply with quote

I have logged this as something to investigate.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group