fdoc

subroutinewrite_typeprivate

subroutine write_type(site, e, b)

Write the type of variable e.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

etype(entity_t)in

the variable

btype(buffer_t)inout

the HTML

Calls

Source

Show the code
subroutine write_type(site, e, b)
    type(site_t), intent(in) :: site        !! the site
    type(entity_t), intent(in) :: e         !! the variable
    type(buffer_t), intent(inout) :: b      !! the HTML

    call html_escape(e%vartype, b, .false.)
    if (allocated(e%type_kind) .and. allocated(e%strlen)) then
        call add(b, '(len=')
        call html_escape(e%strlen, b, .false.)
        call add(b, ', kind=')
        call html_escape(e%type_kind, b, .false.)
        call add(b, ')')
    else if (allocated(e%type_kind)) then
        call add(b, '(kind=')
        call html_escape(e%type_kind, b, .false.)
        call add(b, ')')
    else if (allocated(e%strlen)) then
        call add(b, '(len=')
        call html_escape(e%strlen, b, .false.)
        call add(b, ')')
    else if (allocated(e%proto)) then
        call add(b, '(')
        call link_to(site, e%proto_id, e%proto(1)%s, b)
        if (size(e%proto) > 1) then
            if (len(e%proto(2)%s) > 0) then
                call add(b, '(')
                call html_escape(e%proto(2)%s, b, .false.)
                call add(b, ')')
            end if
        end if
        call add(b, ')')
    end if
end subroutine write_type

Graphs

Calls

Called by