You need to fully understand the old FORTRAN code. EQUIVALENCE uses memory without converting values ββbetween different data types. Perhaps the programmer saved memory using overlapping arrays that were not used at the same time, and EQUIVALENCE can be ignored. Perhaps they were doing something very complex, based on the binary representation of a particular platform, and you would need to figure out what they were doing.
There is very little reason to use EQUIVALENCE in modern Fortran. In most cases, when a bit needs to be transferred from one type to another without conversion, the internal TRANSFER function should be used instead.
source share