fdoc

subroutineform_keyprivate

subroutine form_key(list, id, key)

What specific procedure id has in common with those of its call form.

Arguments

NameTypeIntentAttributesDescription
listtype(entity_list_t)in

the entities

idintegerin

the procedure

keycharacter(len=:)outallocatable

the key

Calls

Source

Show the code
subroutine form_key(list, id, key)
    type(entity_list_t), intent(in) :: list             !! the entities
    integer, intent(in) :: id                           !! the procedure
    character(len=:), allocatable, intent(out) :: key   !! the key
    type(buffer_t) :: b
    integer :: k

    associate (e => list%box(id)%e)
        call add(b, merge('f', 's', e%kind == E_FUNCTION))
        do k = 1, size(e%more%arg_ids)
            call add(b, ',')
            if (e%more%arg_ids(k) == 0) cycle
            associate (a => list%box(e%more%arg_ids(k))%e)
                call add(b, lowercase(a%name))
                if (a%optional) call add(b, '?')
            end associate
        end do
    end associate
    call take(b, key)
end subroutine form_key

Graphs

Calls

Called by