gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dccaltochar.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

character(string) function dccaltochar1 (cal)
 Convert calendar information into strings.

Function/Subroutine Documentation

◆ dccaltochar1()

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

Convert calendar information into strings.

Author
Yasuhiro MORIKAWA

Procedures described in this file are provided from "dc_calendar" module.

Convert DC_CAL variable to character string

Convert a dc_calendar_types#DC_CAL variable cal into a character variable result. The format is as follows.

CCCC:month_in_year=MM,day_in_month=(/DD1,.../),hour_in_day=hh,min_in_hour=mm,sec_in_min=ss

CCCC is a type of calendar (number of characters is arbitrary). The rest is information about number of months of a year, etc.

Parameters
[in]calAn object that stores information of calendar
Returns
Character representation of the calendar information

Definition at line 52 of file dccaltochar.f90.

53
54 use dc_calendar_types, only: dc_cal
56 use dc_types, only: string, token
57 use dc_string, only: tochar, cprintf, stoa, tochar
58 use dc_message, only: messagenotify
59 implicit none
60 character(STRING):: result
61 type(DC_CAL), intent(in):: cal
62
63 character(TOKEN):: cal_str
64continue
65
66 cal_str = dccaltype_str( cal % cal_type )
67
68 result = cprintf('%c:month_in_year=%d,day_in_month=(/%c/),hour_in_day=%d,min_in_hour=%d,sec_in_min=%f', &
69 & i = (/ cal % month_in_year, cal % hour_in_day, cal % min_in_hour /), &
70 & d = (/ cal % sec_in_min /), &
71 & c1=trim(cal_str), c2=trim(tochar(cal % day_in_month)))
72
Internal module for dc_calendar.
character(token) function, public dccaltype_str(cal_type)
Derived types and parameters of calendar and date.
Message output module.
Handling character types.
Definition dc_string.f90:83
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public token
Character length for word, token
Definition dc_types.f90:128
integer, parameter, public string
Character length for string
Definition dc_types.f90:137

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

Here is the call graph for this function: