Silverfrost Forums

Welcome to our forums

ENTRY subroutines and functions not public in module

6 Jan 2015 9:37 #15279

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).

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
6 Jan 2015 11:54 #15280

Thanks for this. I have logged it for investigation.

17 Jan 2015 1:33 #15317

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

entry bbb()

17 Jan 2015 1:43 #15319

OK Thanks - I didn't try using Entry points with arguments or an empty argument list.

Please login to reply.