Loading...
Searching...
No Matches
hstnmlinforedefine.f90
Go to the documentation of this file.
1!= 出力モードから定義モードに移行
2!= Transit from output mode to define mode
3!
4! Authors:: Yasuhiro MORIKAWA
5! Version:: $Id: hstnmlinforedefine.f90,v 1.1 2009-05-11 15:15:14 morikawa Exp $
6! Tag Name:: $Name: $
7! Copyright:: Copyright (C) GFD Dennou Club, 2007-2009. All rights reserved.
8! License:: See COPYRIGHT[link:../../../COPYRIGHT]
9!
10 subroutine hstnmlinforedefine( gthstnml, err )
11 !
12 ! 出力モードから定義モードに戻り,
13 ! 再び情報を設定可能にします.
14 ! HstNmlInfoAssocGTHist サブルーチンを呼び出す前には,
15 ! 再度 HstNmlInfoEndDefine を呼び出して定義モードへと移行してください.
16 ! このサブルーチンを呼んだ後でなら, 再度
17 ! HstNmlInfoAdd, HstNmlInfoDelete, HstNmlInfoResetDefault
18 ! を呼ぶことが可能です.
19 !
20 ! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定
21 ! されていない場合にも, プログラムはエラーを発生させます.
22 !
23 ! Return from output mode to define mode,
24 ! information can be configured again.
25 ! Use "HstNmlInfoEndDefine" again and
26 ! transit from define mode to output mode,
27 ! before "HstNmlInfoAssocGTHist" is used.
28 ! "HstNmlInfoAdd", "HstNmlInfoDelete", "HstNmlInfoResetDefault"
29 ! can be are used again after
30 ! this subroutine is used.
31 !
32 ! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet,
33 ! error is occurred.
34 !
36 use dc_trace, only: beginsub, endsub
37 use dc_string, only: putline, printf, split, strinclude, stoa, joinchar
38 use dc_types, only: dp, string, token, stdout
41 use dc_message, only: messagenotify
42 implicit none
43 type(gthst_nmlinfo), intent(inout):: gthstnml
44 logical, intent(out), optional:: err
45 ! 例外処理用フラグ.
46 ! デフォルトでは, この手続き内でエラーが
47 ! 生じた場合, プログラムは強制終了します.
48 ! 引数 *err* が与えられる場合,
49 ! プログラムは強制終了せず, 代わりに
50 ! *err* に .true. が代入されます.
51 !
52 ! Exception handling flag.
53 ! By default, when error occur in
54 ! this procedure, the program aborts.
55 ! If this *err* argument is given,
56 ! .true. is substituted to *err* and
57 ! the program does not abort.
58
59 !-----------------------------------
60 ! 作業変数
61 ! Work variables
62 integer:: stat
63 character(STRING):: cause_c
64 character(*), parameter:: subname = 'HstNmlInfoReDefine'
65 continue
66 call beginsub( subname )
67 stat = dc_noerr
68 cause_c = ''
69
70 !-----------------------------------------------------------------
71 ! 初期設定のチェック
72 ! Check initialization
73 !-----------------------------------------------------------------
74 if ( .not. gthstnml % initialized ) then
75 stat = dc_enotinit
76 cause_c = 'GTHST_NMLINFO'
77 goto 999
78 end if
79
80 if ( gthstnml % define_mode ) then
81 stat = hst_eindefine
82 cause_c = 'ReDefine'
83 goto 999
84 end if
85
86 !-----------------------------------------------------------------
87 ! 定義モードへと戻る
88 ! Return to define mode
89 !-----------------------------------------------------------------
90 gthstnml % define_mode = .true.
91
92 !-----------------------------------------------------------------
93 ! 終了処理, 例外処理
94 ! Termination and Exception handling
95 !-----------------------------------------------------------------
96999 continue
97 call storeerror( stat, subname, err, cause_c )
98 call endsub( subname )
99 end subroutine hstnmlinforedefine
subroutine hstnmlinforedefine(gthstnml, 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 hst_eintfile
Definition dc_error.f90:583
integer, parameter, public dc_noerr
Definition dc_error.f90:509
integer, parameter, public hst_eindefine
Definition dc_error.f90:582
integer, parameter, public hst_enotindefine
Definition dc_error.f90:581
種別型パラメタを提供します。
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 stdout
標準出力の装置番号
Definition dc_types.f90:98
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:83