functionpublic_symbolpureprivate
pure integer function public_symbol(p, which, name, category) result(id)
The public entity of module which named name in category category, or 0.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | in | the project | |
| which | integer | in | position in | |
| name | character(len=*) | in | the name, in lowercase | |
| category | integer | in | the category |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| id | integer |
Calls
Source
Show the code
pure integer function public_symbol(p, which, name, category) result(id)
type(project_t), intent(in) :: p !! the project
integer, intent(in) :: which !! position in `p%modules`
character(len=*), intent(in) :: name !! the name, in lowercase
integer, intent(in) :: category !! the category
id = 0
if (p%pub(which)%state == 0) return
select case (category)
case (1); id = find_in(p%pub(which)%procs, name)
case (2); id = find_in(p%pub(which)%absints, name)
case (3); id = find_in(p%pub(which)%types, name)
case default; id = find_in(p%pub(which)%vars, name)
end select
end function public_symbol