Commit eaef357b by Jerry DeLisle Committed by Steven G. Kargl

intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING and CMPLX

* intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
  and CMPLX

Co-Authored-By: Steven G. Kargl <kargls@comcast.net>

From-SVN: r100297
parent c3f829c1
2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
Steven G. Kargl <kargls@comcast.net>
* intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
and CMPLX
2005-05-27 Steven G. Kargl <kargls@comcast.net> 2005-05-27 Steven G. Kargl <kargls@comcast.net>
* trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
......
...@@ -32,41 +32,46 @@ This portion of the document is incomplete and undergoing massive expansion ...@@ -32,41 +32,46 @@ This portion of the document is incomplete and undergoing massive expansion
and editing. All contributions and corrections are strongly encouraged. and editing. All contributions and corrections are strongly encouraged.
@menu @menu
* Introduction: Introduction * Introduction: Introduction
* @code{ABORT}: ABORT, Abort the program * @code{ABORT}: ABORT, Abort the program
* @code{ABS}: ABS, Absolute value * @code{ABS}: ABS, Absolute value
* @code{ACHAR}: ACHAR, Character in @acronym{ASCII} collating sequence * @code{ACHAR}: ACHAR, Character in @acronym{ASCII} collating sequence
* @code{ACOS}: ACOS, Arccosine function * @code{ACOS}: ACOS, Arccosine function
* @code{ADJUSTL}: ADJUSTL, Left adjust a string * @code{ADJUSTL}: ADJUSTL, Left adjust a string
* @code{ADJUSTR}: ADJUSTR, Right adjust a string * @code{ADJUSTR}: ADJUSTR, Right adjust a string
* @code{AIMAG}: AIMAG, Imaginary part of complex number * @code{AIMAG}: AIMAG, Imaginary part of complex number
* @code{AINT}: AINT, Truncate to a whole number * @code{AINT}: AINT, Truncate to a whole number
* @code{ALL}: ALL, Determine if all values are true * @code{ALL}: ALL, Determine if all values are true
* @code{ALLOCATED}: ALLOCATED, Status of allocatable entity * @code{ALLOCATED}: ALLOCATED, Status of allocatable entity
* @code{ANINT}: ANINT, Nearest whole number * @code{ANINT}: ANINT, Nearest whole number
* @code{ANY}: ANY, Determine if any values are true * @code{ANY}: ANY, Determine if any values are true
* @code{ASIN}: ASIN, Arcsine function * @code{ASIN}: ASIN, Arcsine function
* @code{ASSOCIATED}: ASSOCIATED, Status of a pointer or pointer/target pair * @code{ASSOCIATED}: ASSOCIATED, Status of a pointer or pointer/target pair
* @code{ATAN}: ATAN, Arctangent function * @code{ATAN}: ATAN, Arctangent function
* @code{ATAN2}: ATAN2, Arctangent function * @code{ATAN2}: ATAN2, Arctangent function
* @code{BESJ0}: BESJ0, Bessel function of the first kind of order 0 * @code{BESJ0}: BESJ0, Bessel function of the first kind of order 0
* @code{BESJ1}: BESJ1, Bessel function of the first kind of order 1 * @code{BESJ1}: BESJ1, Bessel function of the first kind of order 1
* @code{BESJN}: BESJN, Bessel function of the first kind * @code{BESJN}: BESJN, Bessel function of the first kind
* @code{BESY0}: BESY0, Bessel function of the second kind of order 0 * @code{BESY0}: BESY0, Bessel function of the second kind of order 0
* @code{BESY1}: BESY1, Bessel function of the second kind of order 1 * @code{BESY1}: BESY1, Bessel function of the second kind of order 1
* @code{BESYN}: BESYN, Bessel function of the second kind * @code{BESYN}: BESYN, Bessel function of the second kind
* @code{COS}: COS, Cosine function * @code{BIT_SIZE}: BIT_SIZE, Bit size inquiry function
* @code{COSH}: COSH, Hyperbolic cosine function * @code{BTEST}: BTEST, Bit test function
* @code{ERF}: ERF, Error function * @code{CEILING}: CEILING, Integer ceiling function
* @code{ERFC}: ERFC, Complementary error function * @code{CHAR}: CHAR, Character conversion function
* @code{EXP}: EXP, Cosine function * @code{CMPLX}: CMPLX, Complex conversion function
* @code{LOG}: LOG, Logarithm function * @code{COS}: COS, Cosine function
* @code{LOG10}: LOG10, Base 10 logarithm function * @code{COSH}: COSH, Hyperbolic cosine function
* @code{SQRT}: SQRT, Square-root function * @code{ERF}: ERF, Error function
* @code{SIN}: SIN, Sine function * @code{ERFC}: ERFC, Complementary error function
* @code{SINH}: SINH, Hyperbolic sine function * @code{EXP}: EXP, Cosine function
* @code{TAN}: TAN, Tangent function * @code{LOG}: LOG, Logarithm function
* @code{TANH}: TANH, Hyperbolic tangent function * @code{LOG10}: LOG10, Base 10 logarithm function
* @code{SQRT}: SQRT, Square-root function
* @code{SIN}: SIN, Sine function
* @code{SINH}: SINH, Hyperbolic sine function
* @code{TAN}: TAN, Tangent function
* @code{TANH}: TANH, Hyperbolic tangent function
@end menu @end menu
@node Introduction @node Introduction
...@@ -124,7 +129,7 @@ which is suitable for debugging purposes. ...@@ -124,7 +129,7 @@ which is suitable for debugging purposes.
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
non-elemental subroutine non-elemental subroutine
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -161,7 +166,7 @@ end program test_abort ...@@ -161,7 +166,7 @@ end program test_abort
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -216,7 +221,7 @@ in the @acronym{ASCII} collating sequence. ...@@ -216,7 +221,7 @@ in the @acronym{ASCII} collating sequence.
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -224,7 +229,7 @@ elemental function ...@@ -224,7 +229,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{I} @tab The type shall be an @code{INTEGER(*)}. @item @var{I} @tab The type shall be @code{INTEGER(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -255,7 +260,7 @@ end program test_achar ...@@ -255,7 +260,7 @@ end program test_achar
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -263,7 +268,7 @@ elemental function ...@@ -263,7 +268,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and a magnitude that is @item @var{X} @tab The type shall be @code{REAL(*)}, and a magnitude that is
less than one. less than one.
@end multitable @end multitable
...@@ -302,7 +307,7 @@ Spaces are inserted at the end of the string as needed. ...@@ -302,7 +307,7 @@ Spaces are inserted at the end of the string as needed.
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -329,6 +334,7 @@ end program test_adjustl ...@@ -329,6 +334,7 @@ end program test_adjustl
@end table @end table
@node ADJUSTR @node ADJUSTR
@section @code{ADJUSTR} --- Right adjust a string @section @code{ADJUSTR} --- Right adjust a string
@findex @code{ADJUSTR} intrinsic @findex @code{ADJUSTR} intrinsic
...@@ -342,7 +348,7 @@ Spaces are inserted at the start of the string as needed. ...@@ -342,7 +348,7 @@ Spaces are inserted at the start of the string as needed.
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -369,6 +375,7 @@ end program test_adjustr ...@@ -369,6 +375,7 @@ end program test_adjustr
@end table @end table
@node AIMAG @node AIMAG
@section @code{AIMAG} --- Imaginary part of complex number @section @code{AIMAG} --- Imaginary part of complex number
@findex @code{AIMAG} intrinsic @findex @code{AIMAG} intrinsic
...@@ -382,7 +389,7 @@ end program test_adjustr ...@@ -382,7 +389,7 @@ end program test_adjustr
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -416,6 +423,7 @@ end program test_aimag ...@@ -416,6 +423,7 @@ end program test_aimag
@end table @end table
@node AINT @node AINT
@section @code{AINT} --- Imaginary part of complex number @section @code{AINT} --- Imaginary part of complex number
@findex @code{AINT} intrinsic @findex @code{AINT} intrinsic
...@@ -429,7 +437,7 @@ end program test_aimag ...@@ -429,7 +437,7 @@ end program test_aimag
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -472,6 +480,7 @@ end program test_aint ...@@ -472,6 +480,7 @@ end program test_aint
@end table @end table
@node ALL @node ALL
@section @code{ALL} --- All values in @var{MASK} along @var{DIM} are true @section @code{ALL} --- All values in @var{MASK} along @var{DIM} are true
@findex @code{ALL} intrinsic @findex @code{ALL} intrinsic
...@@ -485,7 +494,7 @@ in the array along dimension @var{DIM}. ...@@ -485,7 +494,7 @@ in the array along dimension @var{DIM}.
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
transformational function transformational function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -551,7 +560,7 @@ end program test_all ...@@ -551,7 +560,7 @@ end program test_all
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
inquiry function inquiry function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -578,6 +587,7 @@ end program test_allocated ...@@ -578,6 +587,7 @@ end program test_allocated
@end table @end table
@node ANINT @node ANINT
@section @code{ANINT} --- Imaginary part of complex number @section @code{ANINT} --- Imaginary part of complex number
@findex @code{ANINT} intrinsic @findex @code{ANINT} intrinsic
...@@ -591,7 +601,7 @@ end program test_allocated ...@@ -591,7 +601,7 @@ end program test_allocated
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -632,6 +642,7 @@ end program test_anint ...@@ -632,6 +642,7 @@ end program test_anint
@end table @end table
@node ANY @node ANY
@section @code{ANY} --- Any value in @var{MASK} along @var{DIM} is true @section @code{ANY} --- Any value in @var{MASK} along @var{DIM} is true
@findex @code{ANY} intrinsic @findex @code{ANY} intrinsic
...@@ -645,7 +656,7 @@ in the array along dimension @var{DIM}. ...@@ -645,7 +656,7 @@ in the array along dimension @var{DIM}.
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
transformational function transformational function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -698,6 +709,7 @@ end program test_any ...@@ -698,6 +709,7 @@ end program test_any
@end table @end table
@node ASIN @node ASIN
@section @code{ASIN} --- Arcsine function @section @code{ASIN} --- Arcsine function
@findex @code{ASIN} intrinsic @findex @code{ASIN} intrinsic
...@@ -711,7 +723,7 @@ end program test_any ...@@ -711,7 +723,7 @@ end program test_any
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -719,7 +731,7 @@ elemental function ...@@ -719,7 +731,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and a magnitude that is @item @var{X} @tab The type shall be @code{REAL(*)}, and a magnitude that is
less than one. less than one.
@end multitable @end multitable
...@@ -744,6 +756,7 @@ end program test_asin ...@@ -744,6 +756,7 @@ end program test_asin
@end table @end table
@node ASSOCIATED @node ASSOCIATED
@section @code{ASSOCIATED} --- Status of a pointer or pointer/target pair @section @code{ASSOCIATED} --- Status of a pointer or pointer/target pair
@findex @code{ASSOCIATED} intrinsic @findex @code{ASSOCIATED} intrinsic
...@@ -757,7 +770,7 @@ or if @var{PTR} is associated with the target @var{TGT}. ...@@ -757,7 +770,7 @@ or if @var{PTR} is associated with the target @var{TGT}.
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
inquiry function inquiry function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -816,6 +829,7 @@ end program test_associated ...@@ -816,6 +829,7 @@ end program test_associated
@end table @end table
@node ATAN @node ATAN
@section @code{ATAN} --- Arctangent function @section @code{ATAN} --- Arctangent function
@findex @code{ATAN} intrinsic @findex @code{ATAN} intrinsic
...@@ -829,7 +843,7 @@ end program test_associated ...@@ -829,7 +843,7 @@ end program test_associated
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -837,7 +851,7 @@ elemental function ...@@ -837,7 +851,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}. @item @var{X} @tab The type shall be @code{REAL(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -860,6 +874,7 @@ end program test_atan ...@@ -860,6 +874,7 @@ end program test_atan
@end table @end table
@node ATAN2 @node ATAN2
@section @code{ATAN2} --- Arctangent function @section @code{ATAN2} --- Arctangent function
@findex @code{ATAN2} intrinsic @findex @code{ATAN2} intrinsic
...@@ -873,7 +888,7 @@ end program test_atan ...@@ -873,7 +888,7 @@ end program test_atan
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -911,6 +926,7 @@ end program test_atan2 ...@@ -911,6 +926,7 @@ end program test_atan2
@end table @end table
@node BESJ0 @node BESJ0
@section @code{BESJ0} --- Bessel function of the first kind of order 0 @section @code{BESJ0} --- Bessel function of the first kind of order 0
@findex @code{BESJ0} intrinsic @findex @code{BESJ0} intrinsic
...@@ -925,7 +941,7 @@ of @var{X}. ...@@ -925,7 +941,7 @@ of @var{X}.
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -933,7 +949,7 @@ elemental function ...@@ -933,7 +949,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -971,7 +987,7 @@ of @var{X}. ...@@ -971,7 +987,7 @@ of @var{X}.
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -979,7 +995,7 @@ elemental function ...@@ -979,7 +995,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1017,7 +1033,7 @@ end program test_besj1 ...@@ -1017,7 +1033,7 @@ end program test_besj1
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1025,8 +1041,8 @@ elemental function ...@@ -1025,8 +1041,8 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{N} @tab The type shall be an @code{INTEGER(*)}, and it shall be scalar. @item @var{N} @tab The type shall be @code{INTEGER(*)}, and it shall be scalar.
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1064,7 +1080,7 @@ of @var{X}. ...@@ -1064,7 +1080,7 @@ of @var{X}.
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1072,7 +1088,7 @@ elemental function ...@@ -1072,7 +1088,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1109,7 +1125,7 @@ of @var{X}. ...@@ -1109,7 +1125,7 @@ of @var{X}.
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1117,7 +1133,7 @@ elemental function ...@@ -1117,7 +1133,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1154,7 +1170,7 @@ end program test_besy1 ...@@ -1154,7 +1170,7 @@ end program test_besy1
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1162,8 +1178,8 @@ elemental function ...@@ -1162,8 +1178,8 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{N} @tab The type shall be an @code{INTEGER(*)}, and it shall be scalar. @item @var{N} @tab The type shall be @code{INTEGER(*)}, and it shall be scalar.
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1186,6 +1202,214 @@ end program test_besyn ...@@ -1186,6 +1202,214 @@ end program test_besyn
@end table @end table
@node BIT_SIZE
@section @code{BIT_SIZE} --- Bit size inquiry function
@findex @code{BIT_SIZE} intrinsic
@cindex bit_size
@table @asis
@item @emph{Description}:
@code{BIT_SIZE(I)} returns the number of bits (integer precision plus sign bit) represented by the type of @var{I}.
@item @emph{Option}:
f95, gnu
@item @emph{Class}:
elemental function
@item @emph{Syntax}:
@code{I = BIT_SIZE(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 @code{INTEGER(*)}
@item @emph{Example}:
@smallexample
program test_bit_size
integer :: i = 123
integer :: size
size = bit_size(i)
print *, size
end program test_bit_size
@end smallexample
@end table
@node BTEST
@section @code{BTEST} --- Bit test function
@findex @code{BTEST} intrinsic
@cindex BTEST
@table @asis
@item @emph{Description}:
@code{BTEST(I,POS)} returns logical .TRUE. if the bit at @var{POS} in @var{I} is set.
@item @emph{Option}:
f95, gnu
@item @emph{Class}:
elemental function
@item @emph{Syntax}:
@code{I = BTEST(I,POS)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{I} @tab The type shall be @code{INTEGER(*)}.
@item @var{POS} @tab The type shall be @code{INTEGER(*)}.
@end multitable
@item @emph{Return value}:
The return value is of type @code{LOGICAL}
@item @emph{Example}:
@smallexample
program test_btest
integer :: i = 32768 + 1024 + 64
integer :: pos
logical :: bool
do pos=0,16
bool = btest(i, pos)
print *, pos, bool
end do
end program test_btest
@end smallexample
@end table
@node CEILING
@section @code{CEILING} --- Integer ceiling function
@findex @code{CEILING} intrinsic
@cindex CEILING
@table @asis
@item @emph{Description}:
@code{CEILING(X,[KIND])} returns the least integer greater than or equal to @var{X}.
@item @emph{Option}:
f95, gnu
@item @emph{Class}:
elemental function
@item @emph{Syntax}:
@code{X = CEILING(X)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be @code{REAL(*)}.
@item @var{KIND} @tab Optional scaler integer initialization expression.
@end multitable
@item @emph{Return value}:
The return value is of type @code{INTEGER(KIND)}
@item @emph{Example}:
@smallexample
program test_ceiling
real :: x = 63.29
real :: y = -63.59
print *, ceiling(x) ! returns 64
print *, ceiling(y) ! returns -63
end program test_ceiling
@end smallexample
@end table
@node CHAR
@section @code{CHAR} --- Character conversion function
@findex @code{CHAR} intrinsic
@cindex CHAR
@table @asis
@item @emph{Description}:
@code{CHAR(I,[KIND])} returns the character represented by the integer @var{I}.
@item @emph{Option}:
f95, gnu
@item @emph{Class}:
elemental function
@item @emph{Syntax}:
@code{C = CHAR(I)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{I} @tab The type shall be @code{INTEGER(*)}.
@item @var{KIND} @tab Optional scaler integer initialization expression.
@end multitable
@item @emph{Return value}:
The return value is of type @code{CHARACTER(1)}
@item @emph{Example}:
@smallexample
program test_char
integer :: i = 74
character(1) :: c
c = char(i)
print *, i, c ! returns 'J'
end program test_char
@end smallexample
@end table
@node CMPLX
@section @code{CMPLX} --- Complex conversion function
@findex @code{CMPLX} intrinsic
@cindex CMPLX
@table @asis
@item @emph{Description}:
@code{CMPLX(X,[Y,KIND])} returns a complex number where @var{X} is converted to the real component. If @var{Y} is present it is converted to the imaginary component. If @var{Y} is not present then the imaginary component is set to
0.0. If @var{X} is complex then @var{Y} must not be present.
@item @emph{Option}:
f95, gnu
@item @emph{Class}:
elemental function
@item @emph{Syntax}:
@code{C = CMPLX(X)}
@code{C = CMPLX(X,Y)}
@code{C = CMPLX(X,Y,KIND)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .80
@item @var{X} @tab The type may be @code{INTEGER(*)} or @code{REAL(*)} or @code{COMPLEX(*)}.
@item @var{Y} @tab Optional, allowed if @var{X} is not @code{COMPLEX(*)}. May be @code{INTEGER(*)} or @code{REAL(*)}.
@item @var{KIND} @tab Optional scaler integer initialization expression.
@end multitable
@item @emph{Return value}:
The return value is of type @code{COMPLEX(*)}
@item @emph{Example}:
@smallexample
program test_cmplx
integer :: i = 42
real :: x = 3.14
complex :: z
z = cmplx(i, x)
print *, z, cmplx(x)
end program test_cmplx
@end smallexample
@end table
@node COS @node COS
@section @code{COS} --- Cosine function @section @code{COS} --- Cosine function
@findex @code{COS} intrinsic @findex @code{COS} intrinsic
...@@ -1201,7 +1425,7 @@ end program test_besyn ...@@ -1201,7 +1425,7 @@ end program test_besyn
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1209,7 +1433,7 @@ elemental function ...@@ -1209,7 +1433,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)} or @item @var{X} @tab The type shall be @code{REAL(*)} or
@code{COMPLEX(*)}. @code{COMPLEX(*)}.
@end multitable @end multitable
...@@ -1235,6 +1459,7 @@ end program test_cos ...@@ -1235,6 +1459,7 @@ end program test_cos
@end table @end table
@node COSH @node COSH
@section @code{COSH} --- Hyperbolic cosine function @section @code{COSH} --- Hyperbolic cosine function
@findex @code{COSH} intrinsic @findex @code{COSH} intrinsic
...@@ -1248,7 +1473,7 @@ end program test_cos ...@@ -1248,7 +1473,7 @@ end program test_cos
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1256,7 +1481,7 @@ elemental function ...@@ -1256,7 +1481,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}. @item @var{X} @tab The type shall be @code{REAL(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1279,6 +1504,7 @@ end program test_cosh ...@@ -1279,6 +1504,7 @@ end program test_cosh
@end table @end table
@node ERF @node ERF
@section @code{ERF} --- Error function @section @code{ERF} --- Error function
@findex @code{ERF} intrinsic @findex @code{ERF} intrinsic
...@@ -1291,7 +1517,7 @@ end program test_cosh ...@@ -1291,7 +1517,7 @@ end program test_cosh
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1299,7 +1525,7 @@ elemental function ...@@ -1299,7 +1525,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1335,7 +1561,7 @@ end program test_erf ...@@ -1335,7 +1561,7 @@ end program test_erf
@item @emph{Option}: @item @emph{Option}:
gnu gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1343,7 +1569,7 @@ elemental function ...@@ -1343,7 +1569,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}, and it shall be scalar. @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1382,7 +1608,7 @@ end program test_erfc ...@@ -1382,7 +1608,7 @@ end program test_erfc
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1390,12 +1616,12 @@ elemental function ...@@ -1390,12 +1616,12 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)} or @item @var{X} @tab The type shall be @code{REAL(*)} or
@code{COMPLEX(*)}. @code{COMPLEX(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
The return value has same type and kind than @var{X}. The return value has same type and kind as @var{X}.
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
...@@ -1416,6 +1642,7 @@ end program test_exp ...@@ -1416,6 +1642,7 @@ end program test_exp
@end table @end table
@node LOG @node LOG
@section @code{LOG} --- Logarithm function @section @code{LOG} --- Logarithm function
@findex @code{LOG} intrinsic @findex @code{LOG} intrinsic
...@@ -1433,7 +1660,7 @@ end program test_exp ...@@ -1433,7 +1660,7 @@ end program test_exp
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1441,7 +1668,7 @@ elemental function ...@@ -1441,7 +1668,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)} or @item @var{X} @tab The type shall be @code{REAL(*)} or
@code{COMPLEX(*)}. @code{COMPLEX(*)}.
@end multitable @end multitable
...@@ -1486,7 +1713,7 @@ end program test_log ...@@ -1486,7 +1713,7 @@ end program test_log
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1494,7 +1721,7 @@ elemental function ...@@ -1494,7 +1721,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)} or @item @var{X} @tab The type shall be @code{REAL(*)} or
@code{COMPLEX(*)}. @code{COMPLEX(*)}.
@end multitable @end multitable
...@@ -1535,7 +1762,7 @@ end program test_log10 ...@@ -1535,7 +1762,7 @@ end program test_log10
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1543,7 +1770,7 @@ elemental function ...@@ -1543,7 +1770,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)} or @item @var{X} @tab The type shall be @code{REAL(*)} or
@code{COMPLEX(*)}. @code{COMPLEX(*)}.
@end multitable @end multitable
...@@ -1570,7 +1797,6 @@ end program test_sin ...@@ -1570,7 +1797,6 @@ end program test_sin
@node SINH @node SINH
@section @code{SINH} --- Hyperbolic sine function @section @code{SINH} --- Hyperbolic sine function
@findex @code{SINH} intrinsic @findex @code{SINH} intrinsic
...@@ -1584,7 +1810,7 @@ end program test_sin ...@@ -1584,7 +1810,7 @@ end program test_sin
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1592,7 +1818,7 @@ elemental function ...@@ -1592,7 +1818,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}. @item @var{X} @tab The type shall be @code{REAL(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1631,7 +1857,7 @@ end program test_sinh ...@@ -1631,7 +1857,7 @@ end program test_sinh
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1639,7 +1865,7 @@ elemental function ...@@ -1639,7 +1865,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)} or @item @var{X} @tab The type shall be @code{REAL(*)} or
@code{COMPLEX(*)}. @code{COMPLEX(*)}.
@end multitable @end multitable
...@@ -1682,7 +1908,7 @@ end program test_sqrt ...@@ -1682,7 +1908,7 @@ end program test_sqrt
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1690,7 +1916,7 @@ elemental function ...@@ -1690,7 +1916,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}. @item @var{X} @tab The type shall be @code{REAL(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1713,6 +1939,7 @@ end program test_tan ...@@ -1713,6 +1939,7 @@ end program test_tan
@end table @end table
@node TANH @node TANH
@section @code{TANH} --- Hyperbolic tangent function @section @code{TANH} --- Hyperbolic tangent function
@findex @code{TANH} intrinsic @findex @code{TANH} intrinsic
...@@ -1726,7 +1953,7 @@ end program test_tan ...@@ -1726,7 +1953,7 @@ end program test_tan
@item @emph{Option}: @item @emph{Option}:
f95, gnu f95, gnu
@item @emph{Type}: @item @emph{Class}:
elemental function elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
...@@ -1734,7 +1961,7 @@ elemental function ...@@ -1734,7 +1961,7 @@ elemental function
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .80 @multitable @columnfractions .15 .80
@item @var{X} @tab The type shall be an @code{REAL(*)}. @item @var{X} @tab The type shall be @code{REAL(*)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
...@@ -1758,18 +1985,6 @@ end program test_tanh ...@@ -1758,18 +1985,6 @@ end program test_tanh
@comment gen bit_size
@comment
@comment gen btest
@comment
@comment gen ceiling
@comment
@comment gen char
@comment
@comment gen cmplx
@comment
@comment gen command_argument_count @comment gen command_argument_count
@comment @comment
@comment gen conjg @comment gen conjg
......
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