Go to the source code of this file.
Functions/Subroutines | |
| subroutine | dccalparseunit1 (unit_str, unit_sym, err) |
| 単位の解釈 | |
| subroutine dccalparseunit1 | ( | character(*), intent(in) | unit_str, |
| integer, intent(out) | unit_sym, | ||
| logical, intent(out), optional | err ) |
単位の解釈
このファイルに記載される手続き群は dc_calendar モジュールから提供されます.
文字列変数の日時単位を整数型シンボルに変換
文字列変数の日時単位 unit_str を整数型変数の日時単位 unit_sym に変換します. unit_str として有効な文字列は以下の通りです.
| 文字列定数 | 説明 |
|---|---|
| dc_calendar_types#UNIT_SEC | 秒の単位 |
| dc_calendar_types#UNIT_MIN | 分の単位 |
| dc_calendar_types#UNIT_HOUR | 時間の単位 |
| dc_calendar_types#UNIT_DAY | 日の単位 |
| dc_calendar_types#UNIT_MONTH | 月の単位 |
| dc_calendar_types#UNIT_YEAR | 年の単位 |
有効な文字列が与えられた場合, unit_sym に以下の変数に相当する 整数が返ります.
| シンボル定数 | 説明 |
|---|---|
| dc_calendar_types#UNIT_SYMBOL_SEC | 秒の単位 |
| dc_calendar_types#UNIT_SYMBOL_MIN | 分の単位 |
| dc_calendar_types#UNIT_SYMBOL_HOUR | 時間の単位 |
| dc_calendar_types#UNIT_SYMBOL_DAY | 日の単位 |
| dc_calendar_types#UNIT_SYMBOL_MONTH | 月の単位 |
| dc_calendar_types#UNIT_SYMBOL_YEAR | 年の単位 |
無効な値が与えられた場合, エラーを生じます.
| [in] | unit_str | 日時単位の文字列変数 |
| [out] | unit_sym | 日時単位の整数型変数 (シンボル) |
| [out] | err | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが生じた場合, プログラムは強制終了します. 引数 err が与えられる場合, プログラムは強制終了せず, 代わりに err に .true. が代入されます. |
Definition at line 98 of file dccalparseunit.f90.
References dc_trace::beginsub(), dc_error::dc_ebadunit, dc_error::dc_noerr, dc_calendar_internal::dccaldate_str2usym(), dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_calendar_types::unit_symbol_err.