date_fex.tex

来自「CCSM Research Tools: Community Atmospher」· TEX 代码 · 共 41 行

TEX
41
字号
% $Id: Date_fex.tex,v 1.1.6.1 2002/04/24 03:25:48 erik Exp $In the example below we demonstrate basic usage of the {\tt Date} class.  Fora detailed description of the {\tt Date} class interface, see Appendix A.The example shows how to initialize a Gregorian {\tt Date} and increment it by a specified time interval.  Since no memory is allocated from the heapwhen a {\tt Date} is initialized, there is no need to deallocate a {\tt Date} object.\begin{verbatim}  use ESMF_TimeMgmtMod  type(ESMF_Time) :: interval  type(ESMF_Date) :: startDate, endDate!-------------------------------------------------------------------------------    ! Initialize a date to July 20, 1998 and 0 seconds. !-------------------------------------------------------------------------------  startDate = ESMF_DateInit(ESMF_GREGORIAN, 19980720, 0) !-------------------------------------------------------------------------------    ! Initialize a time to 250 days and 7200 seconds. !-------------------------------------------------------------------------------  interval = ESMF_TimeInit(250, 7200)!-------------------------------------------------------------------------------    ! Increment the date with the time. !-------------------------------------------------------------------------------         endDate = ESMF_DateIncrement(startDate, interval)\end{verbatim}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?