fdoc

typeprocedure_header_t

The parts of a subroutine or function statement.

Components

NameTypeAttributesDefaultDescription
argstype(string_t)allocatabledimension(:)

the dummy arguments

attribstype(string_t)allocatabledimension(:)

the prefix attributes (pure, module, ...)

bind_ccharacter(len=:)allocatable

the text in bind(...), if any

is_functionlogical.false.

true for a function

namecharacter(len=:)allocatable

the name

oklogical.false.

false if this is no such statement

prefixcharacter(len=:)allocatable

what comes before the keyword, without attributes

result_namecharacter(len=:)allocatable

the name in result(...), if any

Source

Show the code
type, public :: procedure_header_t
    !! The parts of a `subroutine` or `function` statement.
    character(len=:), allocatable :: name           !! the name
    character(len=:), allocatable :: prefix         !! what comes before the keyword, without attributes
    type(string_t), allocatable :: attribs(:)       !! the prefix attributes (`pure`, `module`, ...)
    type(string_t), allocatable :: args(:)          !! the dummy arguments
    character(len=:), allocatable :: result_name    !! the name in `result(...)`, if any
    character(len=:), allocatable :: bind_c         !! the text in `bind(...)`, if any
    logical :: is_function = .false.                !! true for a function
    logical :: ok = .false.                         !! false if this is no such statement
end type procedure_header_t