gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Functions/Subroutines
hstnmlinfonames.f90 File Reference

変数リストの取得 More...

Go to the source code of this file.

Functions/Subroutines

character(string) function hstnmlinfonames (gthstnml)
 

Detailed Description

変数リストの取得

Author
Yasuhiro MORIKAWA

Definition in file hstnmlinfonames.f90.

Function/Subroutine Documentation

◆ hstnmlinfonames()

character(string) function hstnmlinfonames ( type(gthst_nmlinfo), intent(in)  gthstnml)

登録されている変数名リストを返す

gthstnml に設定されている変数リストをカンマでつなげて 返します.

なお, 与えられた gthstnml が HstNmlInfoCreate によって初期設定 されていない場合, 空文字が返ります.

Parameters
[in]gthstnmlgtool_history_nmlinfo_types::GTHST_NMLINFO 型変数
Returns
変数名をカンマで結合した文字列

Definition at line 37 of file hstnmlinfonames.f90.

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 )
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137
character(1), parameter, public name_delimiter

References gtool_history_nmlinfo_internal::name_delimiter, and dc_types::string.