diff options
author | Steven G. Kargl <kargls@comcast.net> | 2006-03-26 05:20:09 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2006-03-26 05:20:09 +0000 |
commit | 6110b776bc55be34d41be51821d6723a94e120c0 (patch) | |
tree | 3bed4db4af247fc165f3ea184471aa5961edbdbd /gcc/fortran/intrinsic.texi | |
parent | 0853054e96b9be76be424b0bdde28a54305fdd60 (diff) | |
download | gcc-6110b776bc55be34d41be51821d6723a94e120c0.zip gcc-6110b776bc55be34d41be51821d6723a94e120c0.tar.gz gcc-6110b776bc55be34d41be51821d6723a94e120c0.tar.bz2 |
re PR fortran/26816 ([4.1 only] FLOAT Intrinsic does not work with Integer Halfword input)
PR fortran/26816
* intrinsic.c (add_functions): Allow FLOAT to accept all integer kinds.
* intrinsic.texi: Document FLOAT.
* gfortran.dg/float_1.f90: New test.
From-SVN: r112392
Diffstat (limited to 'gcc/fortran/intrinsic.texi')
-rw-r--r-- | gcc/fortran/intrinsic.texi | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 81a56f5..5942329 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -88,6 +88,7 @@ and editing. All contributions and corrections are strongly encouraged. * @code{EXP}: EXP, Exponential function * @code{EXPONENT}: EXPONENT, Exponent function * @code{FDATE}: FDATE, Subroutine (or function) to get the current time as a string +* @code{FLOAT}: FLOAT, Convert integer to default real * @code{FLOOR}: FLOOR, Integer floor function * @code{FNUM}: FNUM, File number function * @code{FREE}: FREE, Memory de-allocation subroutine @@ -2842,6 +2843,41 @@ end program test_fdate @end smallexample @end table +@node FLOAT +@section @code{FLOAT} --- Convert integer to default real +@findex @code{FLOAT} intrinsic +@cindex floor + +@table @asis +@item @emph{Description}: +@code{FLOAT(I)} converts the integer @var{I} to a default real value. + +@item @emph{Option}: +gnu + +@item @emph{Class}: +function + +@item @emph{Syntax}: +@code{X = FLOAT(I)} + +@item @emph{Arguments}: +@multitable @columnfractions .15 .80 +@item @var{I} @tab The type shall be @code{INTEGER(*)}. +@end multitable + +@item @emph{Return value}: +The return value is of type default @code{REAL} + +@item @emph{Example}: +@smallexample +program test_float + integer :: i = 1 + if (float(i) /= 1.) call abort +end program test_float +@end smallexample +@end table + @node FLOOR @section @code{FLOOR} --- Integer floor function |