fdoc

functionimplicit_variableprivate

integer function implicit_variable(list, parent, name, role) result(id)

Add a variable for name, implicitly typed.

Arguments

NameTypeIntentAttributesDescription
listtype(entity_list_t)inout

the entities

parentintegerin

the procedure

namecharacter(len=*)in

the name

roleintegerin

one of the VAR_* constants

Result

NameTypeAttributesDescription
idintegerprivate

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

Graphs

Calls

Called by