Functions/Subroutines
hstnmlinfonames.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

character(string) function hstnmlinfonames (gthstnml)
 

Function/Subroutine Documentation

◆ hstnmlinfonames()

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

Definition at line 11 of file hstnmlinfonames.f90.

References dc_types::dp, gtool_history_nmlinfo_internal::name_delimiter, dc_types::stdout, dc_types::string, and dc_types::token.

11  !
12  ! *gthstnml* が設定されている変数リストをカンマでつなげて
13  ! 返します.
14  !
15  ! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定
16  ! されていない場合, 空文字が返ります.
17  !
18  ! List of variables registered in *gthstnml* is join with camma,
19  ! and returned.
20  !
21  ! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet,
22  ! blank is returned.
23  !
25  use gtool_history_nmlinfo_internal, only: listsearch, listnext
27  use dc_string, only: putline, printf, split, strinclude, stoa, joinchar
28  use dc_types, only: dp, string, token, stdout
29  implicit none
30  character(STRING):: result
31  type(gthst_nmlinfo), intent(in):: gthstnml
32 
33  !-----------------------------------
34  ! 作業変数
35  ! Work variables
36  type(gthst_nmlinfo_entry), pointer:: hptr =>null()
37  logical:: first
38 !!$ character(*), parameter:: subname = 'HstNmlInfoNames'
39  continue
40 
41  result = ''
42  first = .true.
43 
44  !-----------------------------------------------------------------
45  ! 初期設定のチェック
46  ! Check initialization
47  !-----------------------------------------------------------------
48  if ( .not. gthstnml % initialized ) goto 999
49 
50  !-----------------------------------------------------------------
51  ! 情報の取り出し
52  ! Fetch information
53  !-----------------------------------------------------------------
54  hptr => gthstnml % gthstnml_list
55  do while ( associated( hptr % next ) )
56  call listnext( gthstnml_list = hptr ) ! (inout)
57  if ( first ) then
58  result = adjustl( hptr % name )
59  first = .false.
60  else
61  result = trim( result ) // name_delimiter // adjustl( hptr % name )
62  end if
63  end do
64 
65  !-----------------------------------------------------------------
66  ! 終了処理, 例外処理
67  ! Termination and Exception handling
68  !-----------------------------------------------------------------
69 999 continue
70  nullify( hptr )
integer, parameter, public token
Character length for word, token.
Definition: dc_types.f90:109
character(1), parameter, public name_delimiter
integer, parameter, public dp
Double Precision Real number.
Definition: dc_types.f90:83
integer, parameter, public stdout
Unit number for Standard OUTPUT.
Definition: dc_types.f90:98
Provides kind type parameter values.
Definition: dc_types.f90:49
integer, parameter, public string
Character length for string.
Definition: dc_types.f90:118