gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
hstnmlinfoallnamevalid.f90
Go to the documentation of this file.
1
14
44 subroutine hstnmlinfoallnamevalid( gthstnml, &
45 & invalid, &
46 & names, &
47 & err )
50 use dc_trace, only: beginsub, endsub
51 use dc_types, only: string
53 implicit none
54 type(gthst_nmlinfo), intent(in):: gthstnml
55 logical, intent(out):: invalid
56 ! 無効な変数名が存在する
57 ! 場合には .true. を返す.
58 !
59 ! If invalid variable names are exist,
60 ! .true. is returned.
61 !
62 character(*), intent(out):: names
63 ! 無効な変数名のリスト.
64 !
65 ! List of invalid variable names.
66 logical, intent(out), optional:: err
67 ! 例外処理用フラグ.
68 ! デフォルトでは, この手続き内でエラーが
69 ! 生じた場合, プログラムは強制終了します.
70 ! 引数 *err* が与えられる場合,
71 ! プログラムは強制終了せず, 代わりに
72 ! *err* に .true. が代入されます.
73 !
74 ! Exception handling flag.
75 ! By default, when error occur in
76 ! this procedure, the program aborts.
77 ! If this *err* argument is given,
78 ! .true. is substituted to *err* and
79 ! the program does not abort.
80
81 !-----------------------------------
82 ! 作業変数
83 ! Work variables
84 type(gthst_nmlinfo_entry), pointer:: hptr =>null()
85 integer:: stat
86 character(STRING):: cause_c
87 character(*), parameter:: subname = 'HstNmlInfoAllNameValid'
88 continue
89 call beginsub( subname )
90 stat = dc_noerr
91 cause_c = ''
92
93 names = ''
94 invalid = .false.
95
96 !-----------------------------------------------------------------
97 ! 初期設定のチェック
98 ! Check initialization
99 !-----------------------------------------------------------------
100 if ( .not. gthstnml % initialized ) then
101 stat = dc_enotinit
102 cause_c = 'GTHST_NMLINFO'
103 goto 999
104 end if
105
106 !-----------------------------------------------------------------
107 ! *gthstnml* 内から, *name* に関する情報を探査.
108 ! Search information correspond to *name* in *gthstnml*
109 !-----------------------------------------------------------------
110 hptr => gthstnml % gthstnml_list
111 do while ( associated( hptr % next ) )
112 call listnext( gthstnml_list = hptr ) ! (inout)
113
114 if ( hptr % name_invalid ) then
115 invalid = .true.
116 if ( trim(names) /= '' ) names = trim(names) // name_delimiter
117 names = trim(names) // adjustl( hptr % name )
118 end if
119 end do
120
121 !-----------------------------------------------------------------
122 ! 終了処理, 例外処理
123 ! Termination and Exception handling
124 !-----------------------------------------------------------------
125999 continue
126 call storeerror( stat, subname, err, cause_c )
127 call endsub( subname, fmt = '@invalid=%y @names=%c', &
128 & l = (/ invalid /), c1 = trim(names) )
129 end subroutine hstnmlinfoallnamevalid
subroutine hstnmlinfoallnamevalid(gthstnml, invalid, names, err)
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 以下: dc ユーティリティのエラー
Definition dc_error.f90:534
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137
character(1), parameter, public name_delimiter