 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Tue Jan 06, 2015 10:37 am Post subject: ENTRY subroutines and functions not public in module |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Jan 06, 2015 12:54 pm Post subject: |
|
|
Thanks for this. I have logged it for investigation. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Sat Jan 17, 2015 2:33 pm Post subject: |
|
|
This bug has been fixed for the next release.
In the mean time brackets are needed as in
entry bbb() |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Sat Jan 17, 2015 2:43 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|