gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Functions/Subroutines
hstnmlinforesetdefault.f90 File Reference

デフォルト値を残し, 登録したデータを削除 More...

Go to the source code of this file.

Functions/Subroutines

subroutine hstnmlinforesetdefault (gthstnml, err)
 

Detailed Description

デフォルト値を残し, 登録したデータを削除

Author
Yasuhiro MORIKAWA

Definition in file hstnmlinforesetdefault.f90.

Function/Subroutine Documentation

◆ hstnmlinforesetdefault()

subroutine hstnmlinforesetdefault ( type(gthst_nmlinfo), intent(inout)  gthstnml,
logical, intent(out), optional  err 
)

デフォルト設定のみに戻す

デフォルト値を残し, 登録したデータを削除します.

なお, 与えられた gthstnml が HstNmlInfoCreate によって初期設定 されていない場合, プログラムはエラーを発生させます.

Parameters
[in,out]gthstnmlgtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
[out]err例外処理用フラグ. Exception handling flag.

Definition at line 35 of file hstnmlinforesetdefault.f90.

38 use dc_trace, only: beginsub, endsub
39 use dc_types, only: string, token
41 implicit none
42 type(GTHST_NMLINFO), intent(inout):: gthstnml
43 logical, intent(out), optional:: err
44 ! 例外処理用フラグ.
45 ! デフォルトでは, この手続き内でエラーが
46 ! 生じた場合, プログラムは強制終了します.
47 ! 引数 *err* が与えられる場合,
48 ! プログラムは強制終了せず, 代わりに
49 ! *err* に .true. が代入されます.
50 !
51 ! Exception handling flag.
52 ! By default, when error occur in
53 ! this procedure, the program aborts.
54 ! If this *err* argument is given,
55 ! .true. is substituted to *err* and
56 ! the program does not abort.
57
58 !-----------------------------------
59 ! 作業変数
60 ! Work variables
61 character(TOKEN), pointer:: varnames_array(:) =>null()
62 integer:: i, vnmax
63 integer:: stat
64 character(STRING):: cause_c
65 character(*), parameter:: subname = 'HstNmlInfoResetDefault'
66 continue
67 call beginsub( subname )
68 stat = dc_noerr
69 cause_c = ''
70
71 !-----------------------------------------------------------------
72 ! 初期設定のチェック
73 ! Check initialization
74 !-----------------------------------------------------------------
75 if ( .not. gthstnml % initialized ) then
76 stat = dc_enotinit
77 cause_c = 'GTHST_NMLINFO'
78 goto 999
79 end if
80
81 if ( .not. gthstnml % define_mode ) then
82 stat = hst_enotindefine
83 cause_c = 'ResetDefault'
84 goto 999
85 end if
86
87 !-----------------------------------------------------------------
88 ! 変数名リストの取得
89 ! Get varnames list
90 !-----------------------------------------------------------------
91 call hstnmlinfogetnames( gthstnml, & ! (in)
92 & varnames_array ) ! (out)
93 vnmax = size( varnames_array )
94
95 do i = 1, vnmax
96 call hstnmlinfodelete( &
97 & gthstnml = gthstnml, & ! (inout)
98 & name = varnames_array(i) ) ! (in)
99 end do
100
101 deallocate( varnames_array )
102
103 !-----------------------------------------------------------------
104 ! 終了処理, 例外処理
105 ! Termination and Exception handling
106 !-----------------------------------------------------------------
107999 continue
108 call storeerror( stat, subname, err, cause_c )
109 call endsub( subname )
エラー処理用モジュール
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
integer, parameter, public hst_enotindefine
-500 以下: データ入出力層のエラー
Definition dc_error.f90:557
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:457
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:580
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition dc_types.f90:128
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137

References dc_trace::beginsub(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_trace::endsub(), dc_error::hst_enotindefine, dc_error::storeerror(), dc_types::string, and dc_types::token.

Here is the call graph for this function: