fdoc

functionis_separate_bodypure

pure logical function is_separate_body(list, id)

True if entity id is the body of a separate module procedure, whose interface has been found: a module procedure, or a procedure with the module prefix that is not in an interface block.

Arguments

NameTypeIntentAttributesDescription
listtype(entity_list_t)in

the entities

idintegerin

the entity

Result

NameTypeAttributesDescription
is_separate_bodylogical

Called by

Source

Show the code
pure logical function is_separate_body(list, id)
    type(entity_list_t), intent(in) :: list !! the entities
    integer, intent(in) :: id               !! the entity

    is_separate_body = .false.
    associate (e => list%box(id)%e)
        if (e%implements <= 0) return
        if (e%kind /= E_MODPROC) then
            if (e%iface /= IFACE_NONE) return
            if (e%parent > 0) then
                if (list%box(e%parent)%e%kind == E_INTERFACE) return
            end if
        end if
    end associate
    is_separate_body = .true.
end function is_separate_body