F90 Model : F77 EQUIVALENCE?

LeftRight
Fortran 77 provided the EQUIVALENCE statement as a means for the programmer to micro-manage memory by re-using space for different variables and arrays. This often leads to buggy code and endless hours of debugging. There is no need for such memory management, nowadays. Hence, Fortran 90 has made EQUIVALENCE deprecated and it may vanish in some subsequent standard release.

In nearly 30 years, I have found only one bona fide need for EQUIVALENCE, and it was easily replaced by passing the array twice to a subroutine with suitably declared array dimensions.

Code examples

LeftRight
Slide 15