A question about OOP in Fortran?



I should use Fortran for some special reason (I have some old codes
can be referenced) and I want to program my Fortran codes in
oop(object-oriented program) strategy.

In C++, you can use a base class pointer in main program to invoke the
fuctions in derived class. But in Fortran, the derived class is
obtained by "use" base class(type or module containing the type), and
we known that the "use" is only feasible in a one-direction way(i.e.
if A is already use B, then B can't use A) . So, you can't use base
class in main program and then invoke functions in derived class in
the main program. You can only directly use derived class in main
program and then invoke functions in derived class. But I have too
many many derived classes!

How can fortran simulate the C++ 's this behavior (in C++, the
behavior, I think, is in two-direction way)???


Note: I have read some literatures such as professor Akin etc., Decyk
etc., but I think their method is not easy to use if the program is
more complex which has several levels of derived classes.

Any suggestion???

.



Relevant Pages

  • Re: A question about OOP in Fortran?
    ... can be referenced) and I want to program my Fortran codes inoopstrategy. ... But in Fortran, the derived class is ... program and then invoke functions in derived class. ... more complex which has several levels of derived classes. ...
    (comp.lang.fortran)
  • Re: A question about OOP in Fortran?
    ... can be referenced) and I want to program my Fortran codes in ... But in Fortran, the derived class is ... program and then invoke functions in derived class. ... more complex which has several levels of derived classes. ...
    (comp.lang.fortran)
  • Re: A question about OOP in Fortran?
    ... You can only directly use derived class in main | ... |> program and then invoke functions in derived class. ... Li Simula's preference did not seem to be unreasonable. ... Colin Paul Gloster ...
    (comp.lang.fortran)