fdoc

subroutineapply_args

subroutine apply_args(parsed, s, stat, errmsg)

Apply command line options to the settings.

Arguments

NameTypeIntentAttributesDescription
parsedtype(args_t)in

the command line

stype(settings_t)inout

the settings

statintegerout

nonzero on failure

errmsgcharacter(len=:)outallocatable

what is wrong

Calls

Source

Show the code
subroutine apply_args(parsed, s, stat, errmsg)
    type(args_t), intent(in) :: parsed                  !! the command line
    type(settings_t), intent(inout) :: s                !! the settings
    integer, intent(out) :: stat                        !! nonzero on failure
    character(len=:), allocatable, intent(out) :: errmsg  !! what is wrong
    integer :: k

    stat = 0
    do k = 1, size(parsed%options)
        call set_option(s, parsed%options(k)%key, parsed%options(k)%values, stat, errmsg)
        if (stat /= 0) return
    end do
end subroutine apply_args

Graphs

Calls

Called by