fdoc

subroutineicon_ofprivate

subroutine icon_of(e, letter, word)

The letter of the icon of entity e, or '' if it has none, and what it stands for.

Arguments

NameTypeIntentAttributesDescription
etype(entity_t)in

the entity

lettercharacter(len=:)outallocatable

the letter

wordcharacter(len=:)outallocatable

what it stands for

Called by

Source

Show the code
subroutine icon_of(e, letter, word)
    type(entity_t), intent(in) :: e                         !! the entity
    character(len=:), allocatable, intent(out) :: letter    !! the letter
    character(len=:), allocatable, intent(out) :: word      !! what it stands for

    select case (e%kind)
    case (E_FILE); letter = '≡'; word = 'source file'
    case (E_MODULE); letter = 'M'; word = 'module'
    case (E_SUBMODULE); letter = 'M'; word = 'submodule'
    case (E_PROGRAM); letter = 'P'; word = 'program'
    case (E_BLOCKDATA); letter = 'D'; word = 'block data'
    case (E_SUBROUTINE); letter = 'S'; word = 'subroutine'
    case (E_FUNCTION); letter = 'F'; word = 'function'
    case (E_MODPROC); letter = 'S'; word = 'module procedure'
    case (E_INTERFACE); letter = 'I'; word = 'interface'
    case (E_TYPE); letter = 'T'; word = 'derived type'
    case (E_BOUNDPROC); letter = 'B'; word = 'type-bound procedure'
    case (E_VARIABLE); letter = 'V'; word = 'variable'
    case (E_NAMELIST); letter = 'N'; word = 'namelist'
    case default
        letter = ''
        word = ''
        return
    end select
    if (e%iface == IFACE_EXPLICIT) then
        letter = 'I'
        word = 'interface'
    else if (e%iface == IFACE_ABSTRACT) then
        letter = 'A'
        word = 'abstract interface'
    end if
end subroutine icon_of