<Example Program>
Module types
Type t
Real a
End Type
Type, Extends(t) :: et
Real b
End Type
End Module
Program example
Use types
Class(t),Pointer :: a, b, c
Allocate(t::a)
Allocate(et::b)
Allocate(t::c)
Print *,'Does A have the same type as B?', Same_Type_As(a, b)
Print *,'Does A have the same type as C?', Same_Type_As(a, c)
End Program
|
|
Execution ResultsDoes A have the same type as B? F Does A have the same type as C? T |
|