Private module procedures
From: Pierre Asselin (pa_at_see.signature.invalid)
Date: 01/28/04
- Next message: Pierre Asselin: "Re: Help from fellow Fortran Users"
- Previous message: Steve Lionel: "Re: Intel Fortran for Windows, student edition costs $29."
- Next in thread: James Van Buskirk: "Re: Private module procedures"
- Reply: James Van Buskirk: "Re: Private module procedures"
- Reply: Paul van Delst: "Re: Private module procedures"
- Reply: Richard Maine: "Re: Private module procedures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Jan 2004 18:10:12 +0000 (UTC)
How do I make a procedure private to a module?
module testing
! want to expose function "good" but not function "secret".
! integer, PRIVATE:: secret ! doesn't work
contains
integer function good(i)
integer i
good= i
return
end function good
!integer, PRIVATE:: function secret(i) ! doesn't work
integer function secret(i)
integer i
! PRIVATE secret ! doesn't work either
bad= -i
return
end
end module testing
I could have sworn the first construct was legal. The Portland pgf90
(not sure what release) accepts it but Compaq Visual Fortran 6.6
doesn't. Both compilers reject the other two attempts. Is CVF
correct?
I could always move secret() to a module "testing_priv" which is used
only within "testing", but is there a better way?
-- pa at panix dot com
- Next message: Pierre Asselin: "Re: Help from fellow Fortran Users"
- Previous message: Steve Lionel: "Re: Intel Fortran for Windows, student edition costs $29."
- Next in thread: James Van Buskirk: "Re: Private module procedures"
- Reply: James Van Buskirk: "Re: Private module procedures"
- Reply: Paul van Delst: "Re: Private module procedures"
- Reply: Richard Maine: "Re: Private module procedures"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]