next up previous
Next: Labeled DO statement Up: FORTRAN specific statements Previous: COMMON statement

EQUIVALENCE statement

In our converted program, EQUIVALENCE statement is treated in a simple minded fashion, namely, when the variables are accessed, we replace them with the variable's name which first appears in the EQUIVALENCE statement. Thus, the following program,

   program main
   integer a,b,c
   equivalence (a,b)

   a = 10
   b = 9
   c = 8
   end
is translated into

   class main_mc {
      public static  void main(String args[]) {
         int a,b,c;	//b is of no use, but is kept
         a = 10 ;
         a = 9 ;
         c = 8;
      }
   }




Tue Dec 1 01:57:28 EST 1998