replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - ENTRY subroutines and functions not public in module
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 

ENTRY subroutines and functions not public in module

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



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Tue Jan 06, 2015 10:37 am    Post subject: ENTRY subroutines and functions not public in module Reply with quote

In the following, the name "bbb" should be accessible by any procedure that uses the module. However, the compiler gives the following error:

*** The MODULE variable 'BBB' specified in this use statement does not exist in module MMM.

Without the only clause on the use statement, you get a warning that BBB is missing and a run time error.

This is a bug (admittedly in obsolescent, though valid, code).


Code:

module mmm

contains

   subroutine aaa
   
      print *, 'aaa'
      return
   
   entry bbb
   
      print *, 'bbb'
   
   end subroutine aaa

end module mmm

program anon

   use mmm, only: aaa, bbb
   call aaa
   call bbb

end program anon

_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jan 06, 2015 12:54 pm    Post subject: Reply with quote

Thanks for this. I have logged it for investigation.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Sat Jan 17, 2015 2:33 pm    Post subject: Reply with quote

This bug has been fixed for the next release.
In the mean time brackets are needed as in

entry bbb()
Back to top
View user's profile Send private message AIM Address
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Sat Jan 17, 2015 2:43 pm    Post subject: Reply with quote

OK Thanks - I didn't try using Entry points with arguments or an empty argument list.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
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