Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

How to call an overrided method of a parent class?

lauhwa
Novice
567 Views

Class a has a member of fun() and class b is a children type of class a. Then, I override the method fun() in class b. However, sometimes, I want to call fun() of class a. Is there any way to implement the purpose?

In C++, I can implement it by b.a::fun()

Is there similar way in fortran?

0 Kudos
1 Solution
lauhwa
Novice
548 Views

I found I can use b%a%fun().

View solution in original post

0 Kudos
1 Reply
lauhwa
Novice
549 Views

I found I can use b%a%fun().

0 Kudos
Reply