Loading...
Searching...
No Matches
hstnmlinfonames.f90
Go to the documentation of this file.
1!= 変数リストの取得
2!= Return list of variables
3!
4! Authors:: Yasuhiro MORIKAWA
5! Version:: $Id: hstnmlinfonames.f90,v 1.2 2009-05-31 12:08:02 morikawa Exp $
6! Tag Name:: $Name: $
7! Copyright:: Copyright (C) GFD Dennou Club, 2007-2009. All rights reserved.
8! License:: See COPYRIGHT[link:../../../COPYRIGHT]
9!
10 function hstnmlinfonames( gthstnml ) result(result)
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 !
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 !-----------------------------------------------------------------
69999 continue
70 nullify( hptr )
71 end function hstnmlinfonames
character(string) function hstnmlinfonames(gthstnml)
種別型パラメタを提供します。
Definition dc_types.f90:49
integer, parameter, public stdout
標準出力の装置番号
Definition dc_types.f90:98
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:83
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:118
character(1), parameter, public name_delimiter