compare self and input type base
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_base), | intent(in) | :: | sf |
self |
||
| class(t_base), | intent(in) | :: | tocompare | |||
| logical, | intent(out) | :: | is_same |
SUBROUTINE base_compare( sf , tocompare, is_same) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_base), INTENT(IN ) :: sf !! self CLASS(t_base), INTENT(IN ) :: tocompare !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES LOGICAL , INTENT( OUT) :: is_same !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES LOGICAL :: same_s, same_f !=================================================================================================================================== CALL sf%s%compare(tocompare%s,is_same=same_s) CALL sf%f%compare(tocompare%f,is_same=same_f) is_same=same_s.AND.same_f END SUBROUTINE base_compare