subroutineset_constructorprivate
subroutine set_constructor(p, id)
Give a procedure or interface named like type id, its constructor, the type's permission.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | inout | the project | |
| id | integer | in | the type |
Source
Show the code
subroutine set_constructor(p, id)
type(project_t), intent(inout) :: p !! the project
integer, intent(in) :: id !! the type
integer :: c, child, parent
parent = p%list%box(id)%e%parent
do c = 1, size(p%list%box(parent)%e%children)
child = p%list%box(parent)%e%children(c)
associate (e => p%list%box(child)%e)
select case (e%kind)
case (E_INTERFACE, E_SUBROUTINE, E_FUNCTION)
if (lowercase(e%name) == lowercase(p%list%box(id)%e%name)) e%permission = p%list%box(id)%e%permission
end select
end associate
end do
end subroutine set_constructor