Use of COMMON blocks and EQUIVALENCE statements,
although discouraged by the introduction of modules and pointers in
FORTRAN 90, is widespread. Transfered constants pose no problem.
On the other hand, the awkward programming style of passing input
and returning results from a subroutine or function through
COMMON blocks or using EQUIVALENCEd variables,
requires the user to treat them as if they were declared in the argument
list; that is, their names must be changed, and other variables should
be declared, as described above. The subroutine independent
should be called for the input variables and their values should be
extracted and update the COMMON blocks at the end.
For example
REAL :: constant
REAL :: x ! input variable
COMMON/block/constant, x
...........
! use x
...........
should become
REAL :: constant
REAL :: x_ ! input variable
TYPE (func) :: x
COMMON/block/constant, x_
CALL independent(i, x, x_) ! i : unique index
............
! use x
............
! at the end of the routine
CALL extract(x, x_) ! assign to x_ the expected value