subroutineclose_interfaceprivate
subroutine close_interface(list, id)
Finish an interface block. All but generic interfaces dissolve, leaving their bodies in the unit around them.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| list | type(entity_list_t) | inout | the entities | |
| id | integer | in | the interface |
Calls
Source
Show the code
subroutine close_interface(list, id)
type(entity_list_t), intent(inout) :: list !! the entities
integer, intent(in) :: id !! the interface
integer :: parent, c, child, kind_of_body
if (list%box(id)%e%generic) return
parent = list%box(id)%e%parent
kind_of_body = merge(IFACE_ABSTRACT, IFACE_EXPLICIT, list%box(id)%e%abstract)
do c = 1, size(list%box(id)%e%children)
child = list%box(id)%e%children(c)
associate (e => list%box(child)%e)
if (.not. is_procedure(e%kind)) cycle
e%iface = kind_of_body
e%parent = parent
e%permission = list%box(id)%e%permission
call push_int(list%box(parent)%e%children, child)
end associate
end do
call remove_child(list%box(parent)%e, id)
list%box(id)%e%kind = E_NONE
list%box(id)%e%visible = .false.
end subroutine close_interface