gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Functions/Subroutines
hstnmlinforedefine.f90 File Reference

Transit from output mode to define mode . More...

Go to the source code of this file.

Functions/Subroutines

subroutine hstnmlinforedefine (gthstnml, err)
 

Detailed Description

Transit from output mode to define mode

.

Author
Yasuhiro MORIKAWA

Definition in file hstnmlinforedefine.f90.

Function/Subroutine Documentation

◆ hstnmlinforedefine()

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

Return from output mode to define mode

Return from output mode to define mode, information can be configured again. Use HstNmlInfoEndDefine again and transit from define mode to output mode, before HstNmlInfoAssocGTHist is used. HstNmlInfoAdd, HstNmlInfoDelete, HstNmlInfoResetDefault can be used again after this subroutine is used.

If gthstnml is not initialized by HstNmlInfoCreate yet, error is occurred.

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

Definition at line 48 of file hstnmlinforedefine.f90.

50 use dc_trace, only: beginsub, endsub
51 use dc_types, only: string
53 implicit none
54 type(GTHST_NMLINFO), intent(inout):: gthstnml
55 logical, intent(out), optional:: err
56 ! 例外処理用フラグ.
57 ! デフォルトでは, この手続き内でエラーが
58 ! 生じた場合, プログラムは強制終了します.
59 ! 引数 *err* が与えられる場合,
60 ! プログラムは強制終了せず, 代わりに
61 ! *err* に .true. が代入されます.
62 !
63 ! Exception handling flag.
64 ! By default, when error occur in
65 ! this procedure, the program aborts.
66 ! If this *err* argument is given,
67 ! .true. is substituted to *err* and
68 ! the program does not abort.
69
70 !-----------------------------------
71 ! 作業変数
72 ! Work variables
73 integer:: stat
74 character(STRING):: cause_c
75 character(*), parameter:: subname = 'HstNmlInfoReDefine'
76 continue
77 call beginsub( subname )
78 stat = dc_noerr
79 cause_c = ''
80
81 !-----------------------------------------------------------------
82 ! 初期設定のチェック
83 ! Check initialization
84 !-----------------------------------------------------------------
85 if ( .not. gthstnml % initialized ) then
86 stat = dc_enotinit
87 cause_c = 'GTHST_NMLINFO'
88 goto 999
89 end if
90
91 if ( gthstnml % define_mode ) then
92 stat = hst_eindefine
93 cause_c = 'ReDefine'
94 goto 999
95 end if
96
97 !-----------------------------------------------------------------
98 ! 定義モードへと戻る
99 ! Return to define mode
100 !-----------------------------------------------------------------
101 gthstnml % define_mode = .true.
102
103 !-----------------------------------------------------------------
104 ! 終了処理, 例外処理
105 ! Termination and Exception handling
106 !-----------------------------------------------------------------
107999 continue
108 call storeerror( stat, subname, err, cause_c )
109 call endsub( subname )
Error handling module.
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
Error storage variables
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Definition dc_error.f90:534
integer, parameter, public hst_eindefine
Definition dc_error.f90:558
Debug tracing module.
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
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for string
Definition dc_types.f90:137

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

Here is the call graph for this function: