functionvariable_typeprivate
integer function variable_type(p, id) result(found)
The derived type of variable id, or 0.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | in | the project | |
| id | integer | in | the variable |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| found | integer |
Calls
Source
Show the code
integer function variable_type(p, id) result(found)
type(project_t), intent(in) :: p !! the project
integer, intent(in) :: id !! the variable
found = 0
associate (v => p%list%box(id)%e)
if (.not. allocated(v%proto)) return
if (v%vartype /= 'type' .and. v%vartype /= 'class') return
found = find_symbol(p, v%parent, lowercase(v%proto(1)%s), 3)
end associate
end function variable_type