(j3.2006) Did we intend PROTECTED to imply PUBLIC?

Bill Long longb
Wed Aug 27 15:48:11 EDT 2014

On Aug 27, 2014, at 2:15 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:

> Did we intend PROTECTED to imply PUBLIC?

I don?t recall that ever being proposed.

> It seems pointless to have a private protected variable.

A protected variable can effectively have two identifiers using equivalence.  Currently we allow one to be public and the other private. 

Perhaps more useful: Suppose X is protected and public in module A, but in module B that uses A we don?t want X to be outwardly visible, so it is made private in B.   I don?t see a good reason to prohibit that.

> But the standard doesn't say PROTECTED implies PUBLIC, and at least one
> processor makes it private if the default accessibility is private and
> it's not explicitly public.

One hopes all processors do that.


> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

Bill Long                                                                       longb at cray.com
Fortran Technical Suport  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101

More information about the J3 mailing list