PRIVATE symbol in PUBLIC namelist

Tobias Burnus burnus@net-b.de
Thu Jun 28 07:59:00 GMT 2007


Hi,

Paul Richard Thomas wrote:
> Then, in addition to checking if the symbol is
> private, you then need to check if the symbol is use associated (ie.
> if (sym->attr.private && sym->attr.use_assoc).  This should yield the
> correct behaviour.
This is not the problem (though that was also my first idea): One can
not use associate such a symbol ("has no IMPLICIT type"). What the logic
wants to prevent is a (public) namelist in the specification part of a
module which has private items:

module mod
  real, private :: r
  namelist /n/ r ! cannot be PRIVATE in a PUBLIC namelist
end module mod
use mod
real(44,nml=n)
end

Tobias



More information about the Fortran mailing list