gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_args::strict Interface Reference

Public Member Functions

subroutine dcargsstrict0 (arg, severe)

Detailed Description

Definition at line 354 of file dc_args.f90.

Member Function/Subroutine Documentation

◆ dcargsstrict0()

subroutine dc_args::strict::dcargsstrict0 ( type(args), intent(inout) arg,
logical, intent(in), optional severe )

Perform option check

Performs option validation.

Among command line argument options, if any option that is not configured by DCArgsOption subroutine exists, a warning is returned. If .true. is specified for severe, an error is returned and the program terminates. Before calling this subroutine, please call DCArgsOption, DCArgsDebug, and DCArgsHelp subroutines.

By applying this subroutine to an ARGS derived type variable, you can check whether the options given as command line arguments are correctly recognized by the program.

Parameters
[in,out]argARGS derived type variable
[in]severeIf .true., return error and terminate (optional)

Definition at line 996 of file dc_args.f90.

997 use dc_types, only: string
999 use dc_message, only: messagenotify
1000 implicit none
1001 type(ARGS), intent(inout) :: arg
1002 logical, intent(in), optional :: severe
1003 character(STRING) :: err_mess
1004 integer :: i
1005 character(len = *), parameter :: subname = 'DCArgsStrict'
1006 continue
1007 if (.not. arg % initialized) then
1008 call messagenotify('W', subname, 'Call Open before Help in dc_args.')
1009 call dcargsopen(arg)
1010 end if
1011 do i = 1, size(arg % cmd_opts_list)
1012 err_mess = trim(arg % cmd_opts_list(i) % name) // ' is invalid option.'
1013 if (.not. arg % cmd_opts_list(i) % flag_called) then
1014 if (present_and_true(severe)) then
1015 call messagenotify('E', subname, err_mess)
1016 else
1017 call messagenotify('W', subname, err_mess)
1018 end if
1019 end if
1020 end do
Message output module.
Judge optional control parameters.
logical function, public present_and_true(arg)
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for string
Definition dc_types.f90:137

The documentation for this interface was generated from the following file: