Loading...
Searching...
No Matches
dccaltochar.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

character(string) function dccaltochar1 (cal)

Function/Subroutine Documentation

◆ dccaltochar1()

character(string) function dccaltochar1 ( type(dc_cal), intent(in) cal)

Definition at line 11 of file dccaltochar.f90.

12 !
13 ! dc_calendar_types#DC_CAL 型変数 *cal* を文字型変数 *result*
14 ! へ変換して返します.
15 ! 書式は下記のようになります.
16 !
17 ! CCCC:month_in_year=MM,day_in_month=(/DD1,.../),hour_in_day=hh,min_in_hour=mm,sec_in_min=ss
18 !
19 ! CCCC が暦のタイプ (文字数は任意), 以降は一年の月数等の情報となります.
20 !
21 ! Convert a "dc_calendar_types#DC_CAL" variable *cal* into
22 ! a character variable *result*
23 ! The format is as follows.
24 !
25 ! CCCC:month_in_year=MM,day_in_month=(/DD1,.../),hour_in_day=hh,min_in_hour=mm,sec_in_min=ss
26 !
27 ! CCCC is a type of calencar (number of strings is arbitrary).
28 ! The rest is information about number of months of a year, etc.
29 !
30 use dc_calendar_types, only: dc_cal
32 use dc_types, only: string, token, dp
33 use dc_string, only: tochar, cprintf, stoa, tochar
34 use dc_message, only: messagenotify
35 implicit none
36 character(STRING):: result
37 type(DC_CAL), intent(in):: cal
38 ! 暦情報を収めたオブジェクト.
39 !
40 ! An object that stores information of
41 ! calendar.
42
43 character(TOKEN):: cal_str
44continue
45
46 cal_str = dccaltype_str( cal % cal_type )
47
48 result = cprintf('%c:month_in_year=%d,day_in_month=(/%c/),hour_in_day=%d,min_in_hour=%d,sec_in_min=%f', &
49 & i = (/ cal % month_in_year, cal % hour_in_day, cal % min_in_hour /), &
50 & d = (/ cal % sec_in_min /), &
51 & c1=trim(cal_str), c2=trim(tochar(cal % day_in_month)))
52
character(token) function, public dccaltype_str(cal_type)
種別型パラメタを提供します。
Definition dc_types.f90:49
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition dc_types.f90:109
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:118
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:83

References dc_calendar_internal::dccaltype_str(), dc_types::dp, dc_types::string, and dc_types::token.

Here is the call graph for this function: