A primary difference between object oriented language and procedural language is the former introduces the powerful concept of class. Many other differences are derived from it. Class is a basic concept in Java [3], but it does not exist in FORTRAN 77 [6]. Although the direction of this difference does not present major difficulty for our job, since class is a more general concept than procedure, some details have to be taken care.
In order to successfully convert a FORTRAN source to Java source, classes has to be produced. But how to do it? At least two approaches can be considered.
As an example, the following FORTRAN subroutine
subroutine signMeUp(price, price1) integer price, price1 price = price1 + 1 return end
will be converted into:
class signMeUp_c { static int price_cv; static int price1_cv; public static signMeUp(int price,int price1) { price=price1+1 ; price_cv = price; price1_cv = price1; return; } }
As we see, two extra class variables are produced. Their use is to solve argument passing problem as described below.