Loading...
Searching...
No Matches
historyvarinfoclear.f90
Go to the documentation of this file.
1!= GT_HISTORY_VARINFO 変数のクリア
2!= Destructor of GT_HISTORY_VARINFO
3!
4! Authors:: Yasuhiro MORIKAWA
5! Version:: $Id: historyvarinfoclear.f90,v 1.2 2009-05-25 09:45:19 morikawa Exp $
6! Tag Name:: $Name: $
7! Copyright:: Copyright (C) GFD Dennou Club, 2000-2009. All rights reserved.
8! License:: See COPYRIGHT[link:../../../COPYRIGHT]
9!
10 subroutine historyvarinfoclear0(varinfo, err)
11 !
12 !== GT_HISTORY_VARINFO 型変数初期化
13 !
14 ! *varinfo* で与えられた変数を HistoryVarinfoCreate による初期設定よりも
15 ! さらに前の状態に初期化します。
16 !
17 ! Destructor of GT_HISTORY_VARINFO
18 !
21 use gtool_history_internal, only: default
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.
64999 continue
65 call storeerror( stat, subname, err, cause_c )
66 call endsub(subname)
67 end subroutine historyvarinfoclear0
subroutine historyvarinfoclear0(varinfo, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:830
integer, parameter, public dc_enotinit
Definition dc_error.f90:557
integer, parameter, public dc_noerr
Definition dc_error.f90:509
種別型パラメタを提供します。
Definition dc_types.f90:49
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition dc_types.f90:109
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:118
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:83
type(gt_history), target, save default