functionimplicit_variableprivate
integer function implicit_variable(list, parent, name, role) result(id)
Add a variable for name, implicitly typed.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| list | type(entity_list_t) | inout | the entities | |
| parent | integer | in | the procedure | |
| name | character(len=*) | in | the name | |
| role | integer | in | one of the |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| id | integer | private |
Calls
Source
Show the code
function implicit_variable(list, parent, name, role) result(id)
type(entity_list_t), intent(inout) :: list !! the entities
integer, intent(in) :: parent !! the procedure
character(len=*), intent(in) :: name !! the name
integer, intent(in) :: role !! one of the `VAR_*` constants
integer :: id
id = list%add(E_VARIABLE, parent)
associate (v => list%box(id)%e)
v%name = name
v%var_role = role
v%permission = 'public'
v%vartype = merge('integer', 'real ', index('ijklmn', lowercase(name(1:1))) > 0)
v%vartype = trim(v%vartype)
allocate (v%attribs(0), v%doc(0), v%meta(0))
end associate
end function implicit_variable