Loading...
Searching...
No Matches
gtool_history_nmlinfo_internal::listlast Interface Reference

Public Member Functions

subroutine hstnmlinfolistlast (gthstnml_list, previous, err)

Detailed Description

Definition at line 47 of file gtool_history_nmlinfo_internal.f90.

Member Function/Subroutine Documentation

◆ hstnmlinfolistlast()

subroutine gtool_history_nmlinfo_internal::listlast::hstnmlinfolistlast ( type(gthst_nmlinfo_entry), pointer gthstnml_list,
type(gthst_nmlinfo_entry), optional, pointer previous,
logical, intent(out), optional err )

Definition at line 127 of file gtool_history_nmlinfo_internal.f90.

129 !
130 ! リスト構造である *gthstnml_list* (GTHST_NMLINFO_ENTRY 型) を受け取り,
131 ! 最後のエントリに再結合して返します.
132 ! *gthstnml_list* が始めから空の場合には空状態を返します.
133 !
134 ! *previous* が与えられる場合, 当該エントリの一つ前の
135 ! エントリに結合します.
136 !
137 ! *gthstnml_list* (type "GTHST_NMLINFO_ENTRY") that is a list structure
138 ! is recieved, and *gthstnml_list* is reassociated to
139 ! last entry, and returned.
140 ! If *gthstnml_list* is null from the beginning, null is returned.
141 !
142 ! If *previous* is given, an entry previous to the above entry
143 ! is associated.
144 !
146 use dc_trace, only: beginsub, endsub
147 use dc_error, only: storeerror, dc_noerr
148 use dc_types, only: token, string
149 implicit none
150 type(GTHST_NMLINFO_ENTRY), pointer:: gthstnml_list
151 ! (inout)
152 type(GTHST_NMLINFO_ENTRY), pointer, optional:: previous
153 ! (out)
154 logical, intent(out), optional:: err
155 ! 例外処理用フラグ.
156 ! デフォルトでは, この手続き内でエラーが
157 ! 生じた場合, プログラムは強制終了します.
158 ! 引数 *err* が与えられる場合,
159 ! プログラムは強制終了せず, 代わりに
160 ! *err* に .true. が代入されます.
161 !
162 ! Exception handling flag.
163 ! By default, when error occur in
164 ! this procedure, the program aborts.
165 ! If this *err* argument is given,
166 ! .true. is substituted to *err* and
167 ! the program does not abort.
168
169 !-----------------------------------
170 ! 作業変数
171 ! Work variables
172 integer:: stat
173 character(STRING):: cause_c
174 character(*), parameter:: subname = 'HstNmlInfoListLast'
175 continue
176 call beginsub( subname )
177 stat = dc_noerr
178 cause_c = ''
179
180 if ( present( previous ) ) nullify( previous )
181
182 !-----------------------------------------------------------------
183 ! 空状態の場合は何もしないで返す
184 ! If null, return without change
185 !-----------------------------------------------------------------
186 if ( .not. associated( gthstnml_list ) ) goto 999
187
188 !-----------------------------------------------------------------
189 ! 最後のエントリの *next* に結合して返す
190 ! "*next*" in last entry is associated, and returned
191 !-----------------------------------------------------------------
192 do while ( associated( gthstnml_list % next ) )
193 if ( present( previous ) ) previous => gthstnml_list
194 call listnext( gthstnml_list = gthstnml_list ) ! (inout)
195 end do
196
197 !-----------------------------------------------------------------
198 ! 終了処理, 例外処理
199 ! Termination and Exception handling
200 !-----------------------------------------------------------------
201999 continue
202 call storeerror( stat, subname, err, cause_c )
203 call endsub( subname )
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
種別型パラメタを提供します。
Definition dc_types.f90:49
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition dc_types.f90:109
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:118

References dc_error::dc_noerr, dc_error::storeerror(), dc_types::string, and dc_types::token.

Here is the call graph for this function:

The documentation for this interface was generated from the following file: