gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
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 55 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 )

Move to last entry in list

gthstnml_list (type GTHST_NMLINFO_ENTRY) that is a list structure is received, and gthstnml_list is reassociated to last entry, and returned. If gthstnml_list is null from the beginning, null is returned.

If previous is given, an entry previous to the above entry is associated.

Parameters
[in,out]gthstnml_listList entry pointer
[out]previousPrevious entry pointer (optional)
[out]errError flag (optional)

Definition at line 181 of file gtool_history_nmlinfo_internal.f90.

184 use dc_trace, only: beginsub, endsub
185 use dc_error, only: storeerror, dc_noerr
186 use dc_types, only: string
187 implicit none
188 type(GTHST_NMLINFO_ENTRY), pointer:: gthstnml_list
189 ! (inout)
190 type(GTHST_NMLINFO_ENTRY), pointer, optional:: previous
191 ! (out)
192 logical, intent(out), optional:: err
193 ! 例外処理用フラグ.
194 ! デフォルトでは, この手続き内でエラーが
195 ! 生じた場合, プログラムは強制終了します.
196 ! 引数 *err* が与えられる場合,
197 ! プログラムは強制終了せず, 代わりに
198 ! *err* に .true. が代入されます.
199 !
200 ! Exception handling flag.
201 ! By default, when error occur in
202 ! this procedure, the program aborts.
203 ! If this *err* argument is given,
204 ! .true. is substituted to *err* and
205 ! the program does not abort.
206
207 !-----------------------------------
208 ! 作業変数
209 ! Work variables
210 integer:: stat
211 character(STRING):: cause_c
212 character(*), parameter:: subname = 'HstNmlInfoListLast'
213 continue
214 call beginsub( subname )
215 stat = dc_noerr
216 cause_c = ''
217
218 if ( present( previous ) ) nullify( previous )
219
220 !-----------------------------------------------------------------
221 ! 空状態の場合は何もしないで返す
222 ! If null, return without change
223 !-----------------------------------------------------------------
224 if ( .not. associated( gthstnml_list ) ) goto 999
225
226 !-----------------------------------------------------------------
227 ! 最後のエントリの *next* に結合して返す
228 ! "*next*" in last entry is associated, and returned
229 !-----------------------------------------------------------------
230 do while ( associated( gthstnml_list % next ) )
231 if ( present( previous ) ) previous => gthstnml_list
232 call listnext( gthstnml_list = gthstnml_list ) ! (inout)
233 end do
234
235 !-----------------------------------------------------------------
236 ! 終了処理, 例外処理
237 ! Termination and Exception handling
238 !-----------------------------------------------------------------
239999 continue
240 call storeerror( stat, subname, err, cause_c )
241 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
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_noerr, dc_trace::endsub(), dc_error::storeerror(), and dc_types::string.

Here is the call graph for this function:

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