Definition at line 354 of file dc_args.f90.
◆ dcargsstrict0()
| subroutine dc_args::strict::dcargsstrict0 |
( |
type(args), intent(inout) |
arg, |
|
|
logical, intent(in), optional |
severe |
|
) |
| |
オプションチェックを行う
オプションチェックを行います.
コマンドライン引数のオプションとして指定されたものの内, DCArgsOption サブルーチンで設定されていないものが存在する 場合には警告を返します. severe に .true. を指定すると エラーを返して終了します. このサブルーチンを呼ぶ前に, DCArgsOption, DCArgsDebug, DCArgsHelp サブルーチンを呼んでください.
構造型 ARGS の変数に対してこのサブルーチンを適用しておく ことで, コマンドライン引数として与えたオプションが正しく プログラムが認識しているかどうかをチェックすることができます.
- Parameters
-
| [in,out] | arg | ARGS 型変数 |
| [in] | severe | .true. の場合, エラーを返して終了 (省略可能) |
Definition at line 996 of file dc_args.f90.
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
1016 else
1018 end if
1019 end if
1020 end do
logical function, public present_and_true(arg)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
The documentation for this interface was generated from the following file: