Commit d9d114ec by Janne Blomqvist

PR 47802 Update doc for CTIME and FDATE intrinsics

From-SVN: r170679
parent f787ea5a
2011-03-04 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47802
* intrinsic.texi: Update CTIME and FDATE documentation.
2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* invoke.texi (Option Summary, Fortran Dialect Options) * invoke.texi (Option Summary, Fortran Dialect Options)
......
...@@ -3218,7 +3218,10 @@ end program test_cshift ...@@ -3218,7 +3218,10 @@ end program test_cshift
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{CTIME} converts a system time value, such as returned by @code{CTIME} converts a system time value, such as returned by
@code{TIME8}, to a string of the form @samp{Sat Aug 19 18:13:14 1995}. @code{TIME8}, to a string. Unless the application has called
@code{setlocale}, the output will be in the default locale, of length
24 and of the form @samp{Sat Aug 19 18:13:14 1995}. In other locales,
a longer string may result.
This intrinsic is provided in both subroutine and function forms; however, This intrinsic is provided in both subroutine and function forms; however,
only one form can be used in any given program unit. only one form can be used in any given program unit.
...@@ -3232,18 +3235,20 @@ Subroutine, function ...@@ -3232,18 +3235,20 @@ Subroutine, function
@item @emph{Syntax}: @item @emph{Syntax}:
@multitable @columnfractions .80 @multitable @columnfractions .80
@item @code{CALL CTIME(TIME, RESULT)}. @item @code{CALL CTIME(TIME, RESULT)}.
@item @code{RESULT = CTIME(TIME)}, (not recommended). @item @code{RESULT = CTIME(TIME)}.
@end multitable @end multitable
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .70 @multitable @columnfractions .15 .70
@item @var{TIME} @tab The type shall be of type @code{INTEGER(KIND=8)}. @item @var{TIME} @tab The type shall be of type @code{INTEGER}.
@item @var{RESULT} @tab The type shall be of type @code{CHARACTER} and @item @var{RESULT} @tab The type shall be of type @code{CHARACTER} and
of default kind. of default kind. It is an @code{INTENT(OUT)} argument. If the length
of this variable is too short for the time and date string to fit
completely, it will be blank on procedure return.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
The converted date and time as a string. The converted date and time as a string.
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
...@@ -3260,7 +3265,7 @@ end program test_ctime ...@@ -3260,7 +3265,7 @@ end program test_ctime
@end smallexample @end smallexample
@item @emph{See Also}: @item @emph{See Also}:
@ref{GMTIME}, @ref{LTIME}, @ref{TIME}, @ref{TIME8} @ref{DATE_AND_TIME}, @ref{GMTIME}, @ref{LTIME}, @ref{TIME}, @ref{TIME8}
@end table @end table
...@@ -4420,9 +4425,6 @@ TIME())}. ...@@ -4420,9 +4425,6 @@ TIME())}.
This intrinsic is provided in both subroutine and function forms; however, This intrinsic is provided in both subroutine and function forms; however,
only one form can be used in any given program unit. only one form can be used in any given program unit.
@var{DATE} is an @code{INTENT(OUT)} @code{CHARACTER} variable of the
default kind.
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
...@@ -4432,17 +4434,19 @@ Subroutine, function ...@@ -4432,17 +4434,19 @@ Subroutine, function
@item @emph{Syntax}: @item @emph{Syntax}:
@multitable @columnfractions .80 @multitable @columnfractions .80
@item @code{CALL FDATE(DATE)}. @item @code{CALL FDATE(DATE)}.
@item @code{DATE = FDATE()}, (not recommended). @item @code{DATE = FDATE()}.
@end multitable @end multitable
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .70 @multitable @columnfractions .15 .70
@item @var{DATE}@tab The type shall be of type @code{CHARACTER} of the @item @var{DATE}@tab The type shall be of type @code{CHARACTER} of the
default kind default kind. It is an @code{INTENT(OUT)} argument. If the length of
this variable is too short for the date and time string to fit
completely, it will be blank on procedure return.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
The current date as a string. The current date and time as a string.
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
...@@ -4458,8 +4462,10 @@ program test_fdate ...@@ -4458,8 +4462,10 @@ program test_fdate
print *, 'Program ended on ', date print *, 'Program ended on ', date
end program test_fdate end program test_fdate
@end smallexample @end smallexample
@end table
@item @emph{See also}:
@ref{DATE_AND_TIME}, @ref{CTIME}
@end table
@node FGET @node FGET
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment