Hi,
I'm new to OOPS concepts in fortran but have some idea of them in C. I have three modules of which one is base type and has initialize subroutine that is common to two of its EXTENDS types. Now, I want to use the same subroutine for both of its derived types when passing them as argument. The type of the argument has to be given in the initialize routine. The only way I could get it to compile is by giving its type as class(base_type). But when I run the problem, the values modified inside that initialize routine seems to be valid only in that routine and are reset to garbage values immediately after coming out of it.
any idea?
Thanks!
I'm new to OOPS concepts in fortran but have some idea of them in C. I have three modules of which one is base type and has initialize subroutine that is common to two of its EXTENDS types. Now, I want to use the same subroutine for both of its derived types when passing them as argument. The type of the argument has to be given in the initialize routine. The only way I could get it to compile is by giving its type as class(base_type). But when I run the problem, the values modified inside that initialize routine seems to be valid only in that routine and are reset to garbage values immediately after coming out of it.
any idea?
Thanks!