gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
hstnmlinfonames.f90
Go to the documentation of this file.
1!> @file hstnmlinfonames.f90
2!>
3!> @author Yasuhiro MORIKAWA
4!> @copyright Copyright (C) GFD Dennou Club, 2007-2026. All rights reserved. <br/>
5!> License is BSD-2-Clause. See [COPYRIGHT](@ref COPYRIGHT) in detail
6!>
7!> @en
8!> @brief Return list of variables
9!> @enden
10!>
11!> @ja
12!> @brief 変数リストの取得
13!> @endja
14
15 !> @en
16 !> @brief Return list of registered variable identifiers
17 !>
18 !> List of variables registered in @p gthstnml is joined with comma,
19 !> and returned.
20 !>
21 !> If @p gthstnml is not initialized by HstNmlInfoCreate yet,
22 !> blank is returned.
23 !> @enden
24 !>
25 !> @ja
26 !> @brief 登録されている変数名リストを返す
27 !>
28 !> @p gthstnml に設定されている変数リストをカンマでつなげて
29 !> 返します.
30 !>
31 !> なお, 与えられた @p gthstnml が HstNmlInfoCreate によって初期設定
32 !> されていない場合, 空文字が返ります.
33 !> @endja
34 !>
35 !> @param[in] gthstnml gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
36 !> @return 変数名をカンマで結合した文字列
37 function hstnmlinfonames( gthstnml ) result(result)
41 use dc_types, only: string
42 implicit none
43 character(STRING):: result
44 type(gthst_nmlinfo), intent(in):: gthstnml
45
46 !-----------------------------------
47 ! 作業変数
48 ! Work variables
49 type(gthst_nmlinfo_entry), pointer:: hptr =>null()
50 logical:: first
51!!$ character(*), parameter:: subname = 'HstNmlInfoNames'
52 continue
53
54 result = ''
55 first = .true.
56
57 !-----------------------------------------------------------------
58 ! 初期設定のチェック
59 ! Check initialization
60 !-----------------------------------------------------------------
61 if ( .not. gthstnml % initialized ) goto 999
62
63 !-----------------------------------------------------------------
64 ! 情報の取り出し
65 ! Fetch information
66 !-----------------------------------------------------------------
67 hptr => gthstnml % gthstnml_list
68 do while ( associated( hptr % next ) )
69 call listnext( gthstnml_list = hptr ) ! (inout)
70 if ( first ) then
71 result = adjustl( hptr % name )
72 first = .false.
73 else
74 result = trim( result ) // name_delimiter // adjustl( hptr % name )
75 end if
76 end do
77
78 !-----------------------------------------------------------------
79 ! 終了処理, 例外処理
80 ! Termination and Exception handling
81 !-----------------------------------------------------------------
82999 continue
83 nullify( hptr )
84 end function hstnmlinfonames
character(string) function hstnmlinfonames(gthstnml)
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137
character(1), parameter, public name_delimiter