Hello,
Actually, private in Fortran and Java mean rather the same thing
(with Fortran, it's module-wide, with Java it's class-wide).
Public is rather the same thing in both Fortran and Java (with
Fortran, it means available via use, with Java, it means available
outside the class when an object of the class is in scope).
Protected is the level which Java has, but Fortran currently does not.
Protected is added (in effect) with Fortran 2000.
--
Cheers!
Dan Nagle
Purple Sage Computing Solutions, Inc.
On Wed, 24 Apr 2002 14:28:11 +0100, you wrote:
>Fortran's access keywords PRIVATE, and PUBLIC allow module wide access to
>variables, and public usage through the USE keyword (as I understand it).
>This is synonymous with Java's Private and Protected keywords (again, as I
>understand it).
>
>But my query: is there a synonymous keyword for Java's Public? (I don't
>really know Java, but I am assuming that Java's Public is like F77's COMMON
>block.) Is it possible in F90/F95 to have a safe and secure set of
>completely global entities.
>
>(This is for Object Oriented Programming which I'm rather knew with.)
>
>Thanks in advance, and apologies if what I have written is mince.
>
>Colin.
|