base_class_equal Function

public pure elemental function base_class_equal(b1, b2) result(is_equal)

== operator for base_class variables. To be equal, they must be the same type and have the same ID.

Type Bound

base_class

Arguments

Type IntentOptional Attributes Name
class(base_class), intent(in) :: b1
class(base_class), intent(in) :: b2

Return Value logical


Source Code

    pure elemental function base_class_equal(b1,b2) result(is_equal)

    implicit none

    class(base_class),intent(in) :: b1
    class(base_class),intent(in) :: b2
    logical :: is_equal

    is_equal = same_type_as(b1,b2) .and. (b1%id == b2%id)

    end function base_class_equal