[comp.lang.fortran] Encapsulation in FORTRAN ? / FORTRAN 88

ruede@boulder.Colorado.EDU (Ulrich Ruede) (02/02/90)

In article <Jan.31.11.21.58.1990.29912@topaz.rutgers.edu> elkins@topaz.rutgers.edu (George Elkins) writes:
>For further explanation of encapsulation and disciplined data
>structure access in F77 and for a short example of the second approach
>described in the previous article by Ulrich Ruede, I highly recommend
>reading Bertrand Meyer's book "Object-oriented Software Construction".
>In Chapter 17, Object-oriented Programming in Classical Languages,
>Meyer discusses FORTRAN.  The first approach involving COMMON blocks
>violates what Meyer refers to as the principle of linguistic modular
>units due to the possibility of undiscipled or incorrect access to the
>COMMON blocks from separate and physically unrelated subroutines.

This is a valid aspect. I don't think it matters too much, though,
because directly accessing a common block, whose contents are unknown,
is rather difficult. There is no way to implement LOCAL functions which
are inacessible from outside the module (object) with either approach.

If there are more follow-ups, please make the distribution international.
I'll be moving to Germany in a few days. My e-mail address will be
	ruede@infovax.informatik.tu-muenchen.dbp.de

Ulrich Ruede