Private module procedures

From: Pierre Asselin (pa_at_see.signature.invalid)
Date: 01/28/04

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
        integer function good(i)
        integer i
        good= i
        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
    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

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