historyvarinfoclear.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine historyvarinfoclear0 (varinfo, err)
 

Function/Subroutine Documentation

◆ historyvarinfoclear0()

subroutine historyvarinfoclear0 ( type(gt_history_varinfo), intent(inout)  varinfo,
logical, intent(out), optional  err 
)

Definition at line 11 of file historyvarinfoclear.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.

11  !
12  !== GT_HISTORY_VARINFO 型変数初期化
13  !
14  ! *varinfo* で与えられた変数を HistoryVarinfoCreate による初期設定よりも
15  ! さらに前の状態に初期化します。
16  !
17  ! Destructor of GT_HISTORY_VARINFO
18  !
22  use dc_trace, only: beginsub, endsub, dbgmessage
23  use dc_types, only: string, token, dp
24  implicit none
25  type(gt_history_varinfo),intent(inout) :: varinfo
26  logical, intent(out), optional:: err
27  ! 例外処理用フラグ.
28  ! デフォルトでは, この手続き内でエラーが
29  ! 生じた場合, プログラムは強制終了します.
30  ! 引数 *err* が与えられる場合,
31  ! プログラムは強制終了せず, 代わりに
32  ! *err* に .true. が代入されます.
33  !
34  ! Exception handling flag.
35  ! By default, when error occur in
36  ! this procedure, the program aborts.
37  ! If this *err* argument is given,
38  ! .true. is substituted to *err* and
39  ! the program does not abort.
40 
41  integer:: stat
42  character(STRING):: cause_c
43  character(len = *), parameter:: subname = "HistoryVarinfoClear1"
44  continue
45  call beginsub(subname)
46  stat = dc_noerr
47  cause_c = ''
48 
49  if ( .not. varinfo % initialized ) then
50  stat = dc_enotinit
51  cause_c = 'GT_HISTORY_VARINFO'
52  goto 999
53  end if
54 
55  varinfo % name = ""
56  varinfo % longname = ""
57  varinfo % units = ""
58  varinfo % xtype = ""
59  if (associated(varinfo % attrs)) then
60  deallocate(varinfo % attrs)
61  end if
62 
63  varinfo % initialized = .false.
64 999 continue
65  call storeerror( stat, subname, err, cause_c )
66  call endsub(subname)
type(gt_history), target, save, public default
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function: