fdoc

subroutinepage_name

subroutine page_name(name, out)

name as used in file names and anchors.

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)in

the name

outcharacter(len=:)outallocatable

the result

Calls

Source

Show the code
subroutine page_name(name, out)
    character(len=*), intent(in) :: name                !! the name
    character(len=:), allocatable, intent(out) :: out   !! the result
    integer :: k

    out = ''
    do k = 1, len(name)
        select case (name(k:k))
        case ('<'); out = out//'lt'
        case ('>'); out = out//'gt'
        case ('/'); out = out//'SLASH'
        case ('*'); out = out//'ASTERISK'
        case ('A':'Z'); out = out//lower_char(name(k:k))
        case default; out = out//name(k:k)
        end select
    end do
    if (len(out) == 0) out = '__unnamed__'
end subroutine page_name

Graphs

Calls

Called by