gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
hstnmlinforedefine.f90
Go to the documentation of this file.
1
14
48 subroutine hstnmlinforedefine( gthstnml, err )
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 )
110 end subroutine hstnmlinforedefine
subroutine hstnmlinforedefine(gthstnml, err)
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:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for string
Definition dc_types.f90:137