re PR fortran/28068 (Non-standard intrinsics should be documented)

PR fortran/28068
* intrinsic.texi: General whitespace cleanup, remove
comment about missing intrinsics.
(menu): Add lines for new entries listed below.
(ACOSH): Mention specific function DACOSH, correct
description phrasing.
(ASINH): Mention specific function DASINH, correct
description phrasing.
(ATANH): Mention specific function DATANH, correct
description phrasing.
(COS): Add index entry for CCOS.
(CPU_TIME): Correct "REAL" to "REAL(*)".
(EXP): Add index entry for CEXP.
(INT): Correct argument name to "A".
(INT2): New entry.
(INT8): New entry.
(LONG): New entry.
(MAX): Add index entries for specific variants.
(MCLOCK): New entry.
(MCLOCK8): New entry.
(SECNDS): Adjust to a more standard form.
(SECOND): New entry.
(TIME): Add cross-reference to MCLOCK.
(TIME8): Add cross-reference to MCLOCK8.

From-SVN: r122902
This commit is contained in:
Brooks Moses 2007-03-14 02:43:27 +00:00 committed by Brooks Moses
parent 403d485122
commit 6f50a76ada
2 changed files with 343 additions and 39 deletions

View file

@ -1,3 +1,30 @@
2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
PR fortran/28068
* intrinsic.texi: General whitespace cleanup, remove
comment about missing intrinsics.
(menu): Add lines for new entries listed below.
(ACOSH): Mention specific function DACOSH, correct
description phrasing.
(ASINH): Mention specific function DASINH, correct
description phrasing.
(ATANH): Mention specific function DATANH, correct
description phrasing.
(COS): Add index entry for CCOS.
(CPU_TIME): Correct "REAL" to "REAL(*)".
(EXP): Add index entry for CEXP.
(INT): Correct argument name to "A".
(INT2): New entry.
(INT8): New entry.
(LONG): New entry.
(MAX): Add index entries for specific variants.
(MCLOCK): New entry.
(MCLOCK8): New entry.
(SECNDS): Adjust to a more standard form.
(SECOND): New entry.
(TIME): Add cross-reference to MCLOCK.
(TIME8): Add cross-reference to MCLOCK8.
2007-03-11 Paul Thomas <pault@gcc.gnu.org> 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30883 PR fortran/30883

View file

@ -38,10 +38,6 @@ Some basic guidelines for editing this document:
@chapter Intrinsic Procedures @chapter Intrinsic Procedures
@cindex intrinsic procedures @cindex intrinsic procedures
@comment Missing intrinsics (double check with #19292)
@comment - MClock
@comment - Short
@menu @menu
* Introduction: Introduction to Intrinsics * Introduction: Introduction to Intrinsics
* @code{ABORT}: ABORT, Abort the program * @code{ABORT}: ABORT, Abort the program
@ -145,6 +141,8 @@ Some basic guidelines for editing this document:
* @code{IERRNO}: IERRNO, Function to get the last system error number * @code{IERRNO}: IERRNO, Function to get the last system error number
* @code{INDEX}: INDEX, Position of a substring within a string * @code{INDEX}: INDEX, Position of a substring within a string
* @code{INT}: INT, Convert to integer type * @code{INT}: INT, Convert to integer type
* @code{INT2}: INT2, Convert to 16-bit integer type
* @code{INT8}: INT8, Convert to 64-bit integer type
* @code{IOR}: IOR, Bitwise logical or * @code{IOR}: IOR, Bitwise logical or
* @code{IRAND}: IRAND, Integer pseudo-random number * @code{IRAND}: IRAND, Integer pseudo-random number
* @code{ISATTY}: ISATTY, Whether a unit is a terminal device * @code{ISATTY}: ISATTY, Whether a unit is a terminal device
@ -166,6 +164,7 @@ Some basic guidelines for editing this document:
* @code{LOG}: LOG, Logarithm function * @code{LOG}: LOG, Logarithm function
* @code{LOG10}: LOG10, Base 10 logarithm function * @code{LOG10}: LOG10, Base 10 logarithm function
* @code{LOGICAL}: LOGICAL, Convert to logical type * @code{LOGICAL}: LOGICAL, Convert to logical type
* @code{LONG}: LONG, Convert to integer type
* @code{LSHIFT}: LSHIFT, Left shift bits * @code{LSHIFT}: LSHIFT, Left shift bits
* @code{LSTAT}: LSTAT, Get file status * @code{LSTAT}: LSTAT, Get file status
* @code{LTIME}: LTIME, Convert time to local time info * @code{LTIME}: LTIME, Convert time to local time info
@ -175,6 +174,8 @@ Some basic guidelines for editing this document:
* @code{MAXEXPONENT}: MAXEXPONENT, Maximum exponent of a real kind * @code{MAXEXPONENT}: MAXEXPONENT, Maximum exponent of a real kind
* @code{MAXLOC}: MAXLOC, Location of the maximum value within an array * @code{MAXLOC}: MAXLOC, Location of the maximum value within an array
* @code{MAXVAL}: MAXVAL, Maximum value of an array * @code{MAXVAL}: MAXVAL, Maximum value of an array
* @code{MCLOCK}: MCLOCK, Time function
* @code{MCLOCK8}: MCLOCK8, Time function (64-bit)
* @code{MERGE}: MERGE, Merge arrays * @code{MERGE}: MERGE, Merge arrays
* @code{MIN}: MIN, Minimum value of an argument list * @code{MIN}: MIN, Minimum value of an argument list
* @code{MINEXPONENT}: MINEXPONENT, Minimum exponent of a real kind * @code{MINEXPONENT}: MINEXPONENT, Minimum exponent of a real kind
@ -210,8 +211,7 @@ Some basic guidelines for editing this document:
* @code{SCALE}: SCALE, Scale a real value * @code{SCALE}: SCALE, Scale a real value
* @code{SCAN}: SCAN, Scan a string for the presence of a set of characters * @code{SCAN}: SCAN, Scan a string for the presence of a set of characters
* @code{SECNDS}: SECNDS, Time function * @code{SECNDS}: SECNDS, Time function
@comment * @code{SECOND}: SECOND, (?) * @code{SECOND}: SECOND, CPU time function
@comment * @code{SECONDS}: SECONDS, (?)
* @code{SELECTED_INT_KIND}: SELECTED_INT_KIND, Choose integer kind * @code{SELECTED_INT_KIND}: SELECTED_INT_KIND, Choose integer kind
* @code{SELECTED_REAL_KIND}: SELECTED_REAL_KIND, Choose real kind * @code{SELECTED_REAL_KIND}: SELECTED_REAL_KIND, Choose real kind
* @code{SET_EXPONENT}: SET_EXPONENT, Set the exponent of the model * @code{SET_EXPONENT}: SET_EXPONENT, Set the exponent of the model
@ -327,6 +327,7 @@ end program test_abort
@end table @end table
@node ABS @node ABS
@section @code{ABS} --- Absolute value @section @code{ABS} --- Absolute value
@cindex @code{ABS} intrinsic @cindex @code{ABS} intrinsic
@ -385,6 +386,7 @@ end program test_abs
@end table @end table
@node ACCESS @node ACCESS
@section @code{ACCESS} --- Checks file access modes @section @code{ACCESS} --- Checks file access modes
@cindex @code{ACCESS} @cindex @code{ACCESS}
@ -442,6 +444,7 @@ end program access_test
@end table @end table
@node ACHAR @node ACHAR
@section @code{ACHAR} --- Character in @acronym{ASCII} collating sequence @section @code{ACHAR} --- Character in @acronym{ASCII} collating sequence
@cindex @code{ACHAR} intrinsic @cindex @code{ACHAR} intrinsic
@ -539,15 +542,18 @@ Inverse function: @ref{COS}
@end table @end table
@node ACOSH @node ACOSH
@section @code{ACOSH} --- Hyperbolic arccosine function @section @code{ACOSH} --- Hyperbolic arccosine function
@cindex @code{ACOSH} intrinsic @cindex @code{ACOSH} intrinsic
@cindex @code{DACOSH} intrinsic
@cindex hyperbolic arccosine @cindex hyperbolic arccosine
@cindex hyperbolic cosine (inverse) @cindex hyperbolic cosine (inverse)
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{ACOSH(X)} computes the area hyperbolic cosine of @var{X} (inverse of @code{COSH(X)}). @code{ACOSH(X)} computes the hyperbolic arccosine of @var{X} (inverse of
@code{COSH(X)}).
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
@ -576,6 +582,12 @@ PROGRAM test_acosh
END PROGRAM END PROGRAM
@end smallexample @end smallexample
@item @emph{Specific names}:
@multitable @columnfractions .20 .20 .20 .25
@item Name @tab Argument @tab Return type @tab Standard
@item @code{DACOSH(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab GNU extension
@end multitable
@item @emph{See also}: @item @emph{See also}:
Inverse function: @ref{COSH} Inverse function: @ref{COSH}
@end table @end table
@ -931,6 +943,7 @@ end program test_allocated
@end table @end table
@node AND @node AND
@section @code{AND} --- Bitwise logical AND @section @code{AND} --- Bitwise logical AND
@cindex @code{AND} intrinsic @cindex @code{AND} intrinsic
@ -1152,15 +1165,17 @@ Inverse function: @ref{SIN}
@end table @end table
@node ASINH @node ASINH
@section @code{ASINH} --- Hyperbolic arcsine function @section @code{ASINH} --- Hyperbolic arcsine function
@cindex @code{ASINH} intrinsic @cindex @code{ASINH} intrinsic
@cindex @code{DASINH} intrinsic
@cindex hyperbolic arcsine @cindex hyperbolic arcsine
@cindex hyperbolic sine (inverse) @cindex hyperbolic sine (inverse)
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{ASINH(X)} computes the area hyperbolic sine of @var{X} (inverse of @code{SINH(X)}). @code{ASINH(X)} computes the hyperbolic arcsine of @var{X} (inverse of @code{SINH(X)}).
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
@ -1188,6 +1203,12 @@ PROGRAM test_asinh
END PROGRAM END PROGRAM
@end smallexample @end smallexample
@item @emph{Specific names}:
@multitable @columnfractions .20 .20 .20 .25
@item Name @tab Argument @tab Return type @tab Standard
@item @code{DASINH(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab GNU extension.
@end multitable
@item @emph{See also}: @item @emph{See also}:
Inverse function: @ref{SINH} Inverse function: @ref{SINH}
@end table @end table
@ -1326,7 +1347,8 @@ Inverse function: @ref{TAN}
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{ATAN2(Y,X)} computes the arctangent of the complex number @math{X + i Y}. @code{ATAN2(Y,X)} computes the arctangent of the complex number
@math{X + i Y}.
@item @emph{Standard}: @item @emph{Standard}:
F77 and later F77 and later
@ -1373,12 +1395,14 @@ end program test_atan2
@node ATANH @node ATANH
@section @code{ATANH} --- Hyperbolic arctangent function @section @code{ATANH} --- Hyperbolic arctangent function
@cindex @code{ASINH} intrinsic @cindex @code{ASINH} intrinsic
@cindex @code{DASINH} intrinsic
@cindex hyperbolic arctangent @cindex hyperbolic arctangent
@cindex hyperbolic tangent (inverse) @cindex hyperbolic tangent (inverse)
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@code{ATANH(X)} computes the area hyperbolic sine of @var{X} (inverse of @code{TANH(X)}). @code{ATANH(X)} computes the hyperbolic arctangent of @var{X} (inverse
of @code{TANH(X)}).
@item @emph{Standard}: @item @emph{Standard}:
GNU extension GNU extension
@ -1407,13 +1431,18 @@ PROGRAM test_atanh
END PROGRAM END PROGRAM
@end smallexample @end smallexample
@item @emph{Specific names}:
@multitable @columnfractions .20 .20 .20 .25
@item Name @tab Argument @tab Return type @tab Standard
@item @code{DATANH(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab GNU extension
@end multitable
@item @emph{See also}: @item @emph{See also}:
Inverse function: @ref{TANH} Inverse function: @ref{TANH}
@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
@cindex @code{BESJ0} intrinsic @cindex @code{BESJ0} intrinsic
@ -1870,6 +1899,7 @@ and formatted string representations.
@end table @end table
@node CHDIR @node CHDIR
@section @code{CHDIR} --- Change working directory @section @code{CHDIR} --- Change working directory
@cindex @code{CHDIR} intrinsic @cindex @code{CHDIR} intrinsic
@ -1981,6 +2011,7 @@ end program chmod_test
@end table @end table
@node CMPLX @node CMPLX
@section @code{CMPLX} --- Complex conversion function @section @code{CMPLX} --- Complex conversion function
@cindex @code{CMPLX} intrinsic @cindex @code{CMPLX} intrinsic
@ -2071,6 +2102,8 @@ end program test_command_argument_count
@ref{GET_COMMAND}, @ref{GET_COMMAND_ARGUMENT} @ref{GET_COMMAND}, @ref{GET_COMMAND_ARGUMENT}
@end table @end table
@node CONJG @node CONJG
@section @code{CONJG} --- Complex conjugate function @section @code{CONJG} --- Complex conjugate function
@cindex @code{CONJG} intrinsic @cindex @code{CONJG} intrinsic
@ -2123,6 +2156,7 @@ end program test_conjg
@section @code{COS} --- Cosine function @section @code{COS} --- Cosine function
@cindex @code{COS} intrinsic @cindex @code{COS} intrinsic
@cindex @code{DCOS} intrinsic @cindex @code{DCOS} intrinsic
@cindex @code{CCOS} intrinsic
@cindex @code{ZCOS} intrinsic @cindex @code{ZCOS} intrinsic
@cindex @code{CDCOS} intrinsic @cindex @code{CDCOS} intrinsic
@cindex trigonometric functions @cindex trigonometric functions
@ -2291,8 +2325,9 @@ end program test_count
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
Returns a @code{REAL} value representing the elapsed CPU time in seconds. This Returns a @code{REAL(*)} value representing the elapsed CPU time in
is useful for testing segments of code to determine execution time. seconds. This is useful for testing segments of code to determine
execution time.
@item @emph{Standard}: @item @emph{Standard}:
F95 and later F95 and later
@ -2305,7 +2340,7 @@ Subroutine
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .70 @multitable @columnfractions .15 .70
@item @var{TIME} @tab The type shall be @code{REAL} with @code{INTENT(OUT)}. @item @var{TIME} @tab The type shall be @code{REAL(*)} with @code{INTENT(OUT)}.
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
@ -2378,6 +2413,7 @@ end program test_cshift
@end table @end table
@node CTIME @node CTIME
@section @code{CTIME} --- Convert a time into a string @section @code{CTIME} --- Convert a time into a string
@cindex @code{CTIME} intrinsic @cindex @code{CTIME} intrinsic
@ -3262,6 +3298,7 @@ end program test_exit
@section @code{EXP} --- Exponential function @section @code{EXP} --- Exponential function
@cindex @code{EXP} intrinsic @cindex @code{EXP} intrinsic
@cindex @code{DEXP} intrinsic @cindex @code{DEXP} intrinsic
@cindex @code{CEXP} intrinsic
@cindex @code{ZEXP} intrinsic @cindex @code{ZEXP} intrinsic
@cindex @code{CDEXP} intrinsic @cindex @code{CDEXP} intrinsic
@cindex exponential @cindex exponential
@ -3348,6 +3385,7 @@ end program test_exponent
@end table @end table
@node FDATE @node FDATE
@section @code{FDATE} --- Get the current time as a string @section @code{FDATE} --- Get the current time as a string
@cindex @code{FDATE} intrinsic @cindex @code{FDATE} intrinsic
@ -3403,6 +3441,8 @@ end program test_fdate
@end smallexample @end smallexample
@end table @end table
@node FLOAT @node FLOAT
@section @code{FLOAT} --- Convert integer to default real @section @code{FLOAT} --- Convert integer to default real
@ -3500,6 +3540,7 @@ END PROGRAM
@end table @end table
@node FGETC @node FGETC
@section @code{FGETC} --- Read a single character in stream mode @section @code{FGETC} --- Read a single character in stream mode
@cindex @code{FGETC} intrinsic @cindex @code{FGETC} intrinsic
@ -4624,6 +4665,7 @@ and formatted string representations.
@end table @end table
@node IAND @node IAND
@section @code{IAND} --- Bitwise logical and @section @code{IAND} --- Bitwise logical and
@cindex @code{IAND} intrinsic @cindex @code{IAND} intrinsic
@ -5062,11 +5104,11 @@ F77 and later
Elemental function Elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
@item @code{RESULT = INT(X [, KIND))} @code{RESULT = INT(A [, KIND))}
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .70 @multitable @columnfractions .15 .70
@item @var{X} @tab Shall be of type @code{INTEGER(*)}, @item @var{A} @tab Shall be of type @code{INTEGER(*)},
@code{REAL(*)}, or @code{COMPLEX(*)}. @code{REAL(*)}, or @code{COMPLEX(*)}.
@item @var{KIND} @tab (Optional) An @code{INTEGER(*)} initialization @item @var{KIND} @tab (Optional) An @code{INTEGER(*)} initialization
expression indicating the kind parameter of expression indicating the kind parameter of
@ -5079,13 +5121,13 @@ the following rules:
@table @asis @table @asis
@item (A) @item (A)
If @var{X} is of type @code{INTEGER(*)}, @code{INT(X) = X} If @var{A} is of type @code{INTEGER(*)}, @code{INT(A) = A}
@item (B) @item (B)
If @var{X} is of type @code{REAL(*)} and @math{|X| < 1}, @code{INT(X)} equals @var{0}. If @var{A} is of type @code{REAL(*)} and @math{|A| < 1}, @code{INT(A)} equals @code{0}.
If @math{|X| \geq 1}, then @code{INT(X)} equals the largest integer that does not exceed If @math{|A| \geq 1}, then @code{INT(A)} equals the largest integer that does not exceed
the range of @var{X} and whose sign is the same as the sign of @var{X}. the range of @var{A} and whose sign is the same as the sign of @var{A}.
@item (C) @item (C)
If @var{X} is of type @code{COMPLEX(*)}, rule B is applied to the real part of X. If @var{A} is of type @code{COMPLEX(*)}, rule B is applied to the real part of @var{A}.
@end table @end table
@item @emph{Example}: @item @emph{Example}:
@ -5101,8 +5143,8 @@ end program
@item @emph{Specific names}: @item @emph{Specific names}:
@multitable @columnfractions .20 .20 .20 .25 @multitable @columnfractions .20 .20 .20 .25
@item Name @tab Argument @tab Return type @tab Standard @item Name @tab Argument @tab Return type @tab Standard
@item @code{IFIX(X)} @tab @code{REAL(4) X} @tab @code{INTEGER} @tab F77 and later @item @code{IFIX(A)} @tab @code{REAL(4) A} @tab @code{INTEGER} @tab F77 and later
@item @code{IDINT(X)} @tab @code{REAL(8) X} @tab @code{INTEGER} @tab F77 and later @item @code{IDINT(A)} @tab @code{REAL(8) A} @tab @code{INTEGER} @tab F77 and later
@end multitable @end multitable
@comment @item @emph{See also}: @comment @item @emph{See also}:
@ -5110,6 +5152,79 @@ end program
@node INT2
@section @code{INT2} --- Convert to 16-bit integer type
@cindex @code{INT2} intrinsic
@cindex @code{SHORT} intrinsic
@cindex conversion function (integer)
@table @asis
@item @emph{Description}:
Convert to a @code{KIND=2} integer type. This is equivalent to the
standard @code{INT} intrinsic with an optional argument of
@code{KIND=2}, and is only included for backwards compatibility.
The @code{SHORT} intrinsic is equivalent to @code{INT2}.
@item @emph{Standard}:
GNU extension.
@item @emph{Class}:
Elemental function
@item @emph{Syntax}:
@code{RESULT = INT2(A)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{A} @tab Shall be of type @code{INTEGER(*)},
@code{REAL(*)}, or @code{COMPLEX(*)}.
@end multitable
@item @emph{Return value}:
The return value is a @code{INTEGER(2)} variable.
@comment @item @emph{See also}:
@ref{INT}, @ref{INT8}, @ref{LONG}
@end table
@node INT8
@section @code{INT8} --- Convert to 64-bit integer type
@cindex @code{INT8} intrinsic
@cindex conversion function (integer)
@table @asis
@item @emph{Description}:
Convert to a @code{KIND=8} integer type. This is equivalent to the
standard @code{INT} intrinsic with an optional argument of
@code{KIND=8}, and is only included for backwards compatibility.
@item @emph{Standard}:
GNU extension.
@item @emph{Class}:
Elemental function
@item @emph{Syntax}:
@code{RESULT = INT8(A)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{A} @tab Shall be of type @code{INTEGER(*)},
@code{REAL(*)}, or @code{COMPLEX(*)}.
@end multitable
@item @emph{Return value}:
The return value is a @code{INTEGER(8)} variable.
@comment @item @emph{See also}:
@ref{INT}, @ref{INT2}, @ref{LONG}
@end table
@node IOR @node IOR
@section @code{IOR} --- Bitwise logical or @section @code{IOR} --- Bitwise logical or
@cindex @code{IOR} intrinsic @cindex @code{IOR} intrinsic
@ -5148,7 +5263,6 @@ the larger argument.)
@node IRAND @node IRAND
@section @code{IRAND} --- Integer pseudo-random number @section @code{IRAND} --- Integer pseudo-random number
@cindex @code{IRAND} intrinsic @cindex @code{IRAND} intrinsic
@ -5236,7 +5350,6 @@ END PROGRAM
@node ISHFT @node ISHFT
@section @code{ISHFT} --- Shift bits @section @code{ISHFT} --- Shift bits
@cindex @code{ISHFT} intrinsic @cindex @code{ISHFT} intrinsic
@ -5277,7 +5390,6 @@ The return value is of type @code{INTEGER(*)} and of the same kind as
@node ISHFTC @node ISHFTC
@section @code{ISHFTC} --- Shift bits circularly @section @code{ISHFTC} --- Shift bits circularly
@cindex @code{ISHFTC} intrinsic @cindex @code{ISHFTC} intrinsic
@ -5987,6 +6099,41 @@ kind corresponding to @var{KIND}, or of the default logical kind if
@node LONG
@section @code{LONG} --- Convert to integer type
@cindex @code{LONG} intrinsic
@cindex conversion function (integer)
@table @asis
@item @emph{Description}:
Convert to a @code{KIND=4} integer type, which is the same size as a C
@code{long} integer. This is equivalent to the standard @code{INT}
intrinsic with an optional argument of @code{KIND=4}, and is only
included for backwards compatibility.
@item @emph{Standard}:
GNU extension.
@item @emph{Class}:
Elemental function
@item @emph{Syntax}:
@code{RESULT = LONG(A)}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{A} @tab Shall be of type @code{INTEGER(*)},
@code{REAL(*)}, or @code{COMPLEX(*)}.
@end multitable
@item @emph{Return value}:
The return value is a @code{INTEGER(4)} variable.
@comment @item @emph{See also}:
@ref{INT}, @ref{INT2}, @ref{INT8}
@end table
@node LSHIFT @node LSHIFT
@section @code{LSHIFT} --- Left shift bits @section @code{LSHIFT} --- Left shift bits
@ -6029,6 +6176,7 @@ The return value is of type @code{INTEGER(*)} and of the same kind as
@end table @end table
@node LSTAT @node LSTAT
@section @code{LSTAT} --- Get file status @section @code{LSTAT} --- Get file status
@cindex @code{LSTAT} intrinsic @cindex @code{LSTAT} intrinsic
@ -6233,6 +6381,11 @@ for the @code{*} or @code{.AND.} operators.
@node MAX @node MAX
@section @code{MAX} --- Maximum value of an argument list @section @code{MAX} --- Maximum value of an argument list
@cindex @code{MAX} intrinsic @cindex @code{MAX} intrinsic
@cindex @code{MAX0} intrinsic
@cindex @code{AMAX0} intrinsic
@cindex @code{MAX1} intrinsic
@cindex @code{AMAX1} intrinsic
@cindex @code{DMAX1} intrinsic
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@ -6431,6 +6584,84 @@ cases, the result is of the same type and kind as @var{ARRAY}.
@node MCLOCK
@section @code{MCLOCK} --- Time function
@cindex @code{MCLOCK} intrinsic
@cindex time, clock ticks
@cindex clock ticks
@table @asis
@item @emph{Description}:
Returns the number of clock ticks since the start of the process, based
on the UNIX function @code{clock(3)}.
This intrinsic is not fully portable, such as to systems with 32-bit
@code{INTEGER} types but supporting times wider than 32 bits. Therefore,
the values returned by this intrinsic might be, or become, negative, or
numerically less than previous values, during a single run of the
compiled program.
@item @emph{Standard}:
GNU extension
@item @emph{Class}:
Non-elemental function
@item @emph{Syntax}:
@code{RESULT = MCLOCK()}
@item @emph{Return value}:
The return value is a scalar of type @code{INTEGER(4)}, equal to the
number of clock ticks since the start of the process, or @code{-1} if
the system does not support @code{clock(3)}.
@item @emph{See also}:
@ref{CTIME}, @ref{GMTIME}, @ref{LTIME}, @ref{MCLOCK}, @ref{TIME}
@end table
@node MCLOCK8
@section @code{MCLOCK8} --- Time function (64-bit)
@cindex @code{MCLOCK8} intrinsic
@cindex time, current
@cindex current time
@table @asis
@item @emph{Description}:
Returns the number of clock ticks since the start of the process, based
on the UNIX function @code{clock(3)}.
@emph{Warning:} this intrinsic does not increase the range of the timing
values over that returned by @code{clock(3)}. On a system with a 32-bit
@code{clock(3)}, @code{MCLOCK8()} will return a 32-bit value, even though
it is converted to a 64-bit @code{INTEGER(8)} value. That means
overflows of the 32-bit value can still occur. Therefore, the values
returned by this intrinsic might be or become negative or numerically
less than previous values during a single run of the compiled program.
@item @emph{Standard}:
GNU extension
@item @emph{Class}:
Non-elemental function
@item @emph{Syntax}:
@code{RESULT = MCLOCK8()}
@item @emph{Return value}:
The return value is a scalar of type @code{INTEGER(8)}, equal to the
number of clock ticks since the start of the process, or @code{-1} if
the system does not support @code{clock(3)}.
@item @emph{See also}:
@ref{CTIME}, @ref{GMTIME}, @ref{LTIME}, @ref{MCLOCK}, @ref{TIME8}
@end table
@node MERGE @node MERGE
@section @code{MERGE} --- Merge variables @section @code{MERGE} --- Merge variables
@cindex @code{MERGE} intrinsic @cindex @code{MERGE} intrinsic
@ -6468,6 +6699,11 @@ The result is of the same type and type parameters as @var{TSOURCE}.
@node MIN @node MIN
@section @code{MIN} --- Minimum value of an argument list @section @code{MIN} --- Minimum value of an argument list
@cindex @code{MIN} intrinsic @cindex @code{MIN} intrinsic
@cindex @code{MIN0} intrinsic
@cindex @code{AMIN0} intrinsic
@cindex @code{MIN1} intrinsic
@cindex @code{AMIN1} intrinsic
@cindex @code{DMIN1} intrinsic
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
@ -6510,6 +6746,8 @@ and has the same type and kind as the first argument.
@ref{MAX}, @ref{MINLOC}, @ref{MINVAL} @ref{MAX}, @ref{MINLOC}, @ref{MINVAL}
@end table @end table
@node MINEXPONENT @node MINEXPONENT
@section @code{MINEXPONENT} --- Minimum exponent of a real kind @section @code{MINEXPONENT} --- Minimum exponent of a real kind
@cindex @code{MINEXPONENT} intrinsic @cindex @code{MINEXPONENT} intrinsic
@ -7000,6 +7238,7 @@ end program test_nint
@end table @end table
@node NOT @node NOT
@section @code{NOT} --- Logical negation @section @code{NOT} --- Logical negation
@cindex @code{NOT} intrinsic @cindex @code{NOT} intrinsic
@ -7034,7 +7273,6 @@ argument.
@node NULL @node NULL
@section @code{NULL} --- Function that returns an disassociated pointer @section @code{NULL} --- Function that returns an disassociated pointer
@cindex @code{NULL} intrinsic @cindex @code{NULL} intrinsic
@ -7060,7 +7298,6 @@ Transformational function
@node OR @node OR
@section @code{OR} --- Bitwise logical OR @section @code{OR} --- Bitwise logical OR
@cindex @code{OR} intrinsic @cindex @code{OR} intrinsic
@ -7111,7 +7348,6 @@ F95 elemental function: @ref{IOR}
@node PACK @node PACK
@section @code{PACK} --- Pack an array into an array of rank one @section @code{PACK} --- Pack an array into an array of rank one
@cindex @code{PACK} intrinsic @cindex @code{PACK} intrinsic
@ -7586,7 +7822,6 @@ Transformational function
@node RESHAPE @node RESHAPE
@section @code{RESHAPE} --- Function to reshape an array @section @code{RESHAPE} --- Function to reshape an array
@cindex @code{RESHAPE} intrinsic @cindex @code{RESHAPE} intrinsic
@ -7725,6 +7960,7 @@ end program test_scale
@end table @end table
@node SCAN @node SCAN
@section @code{SCAN} --- Scan a string for the presence of a set of characters @section @code{SCAN} --- Scan a string for the presence of a set of characters
@cindex @code{SCAN} intrinsic @cindex @code{SCAN} intrinsic
@ -7749,7 +7985,6 @@ Elemental function
@node SECNDS @node SECNDS
@section @code{SECNDS} --- Time function @section @code{SECNDS} --- Time function
@cindex @code{SECNDS} intrinsic @cindex @code{SECNDS} intrinsic
@ -7767,16 +8002,15 @@ use is discouraged.
GNU extension GNU extension
@item @emph{Class}: @item @emph{Class}:
function Non-elemental function
@item @emph{Syntax}: @item @emph{Syntax}:
@code{RESULT = SECNDS (X)} @code{RESULT = SECNDS (X)}
@item @emph{Arguments}: @item @emph{Arguments}:
@multitable @columnfractions .15 .70 @multitable @columnfractions .15 .70
@item Name @tab Type @item @var{T} @tab Shall be of type @code{REAL(4)}.
@item @var{T} @tab REAL(4) @item @var{X} @tab Shall be of type @code{REAL(4)}.
@item @var{X} @tab REAL(4)
@end multitable @end multitable
@item @emph{Return value}: @item @emph{Return value}:
@ -7798,6 +8032,50 @@ end program test_secnds
@node SECOND
@section @code{SECOND} --- CPU time function
@cindex @code{SECOND} intrinsic
@cindex time, elapsed
@cindex elapsed time
@table @asis
@item @emph{Description}:
Returns a @code{REAL(4)} value representing the elapsed CPU time in
seconds. This provides the same functionality as the standard
@code{CPU_TIME} intrinsic, and is only included for backwards
compatibility.
This intrinsic is provided in both subroutine and function forms;
however, only one form can be used in any given program unit.
@item @emph{Standard}:
GNU extension
@item @emph{Class}:
Subroutine, non-elemental function
@item @emph{Syntax}:
@multitable @columnfractions .80
@item @code{CALL SECOND(TIME)}
@item @code{TIME = SECOND()}
@end multitable
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{TIME} @tab Shall be of type @code{REAL(4)}.
@end multitable
@item @emph{Return value}:
In either syntax, @var{TIME} is set to the process's current runtime in
seconds.
@item @emph{See also}:
@ref{CPU_TIME}
@end table
@node SELECTED_INT_KIND @node SELECTED_INT_KIND
@section @code{SELECTED_INT_KIND} --- Choose integer kind @section @code{SELECTED_INT_KIND} --- Choose integer kind
@cindex @code{SELECTED_INT_KIND} intrinsic @cindex @code{SELECTED_INT_KIND} intrinsic
@ -8089,6 +8367,7 @@ end program test_signal
@section @code{SIN} --- Sine function @section @code{SIN} --- Sine function
@cindex @code{SIN} intrinsic @cindex @code{SIN} intrinsic
@cindex @code{DSIN} intrinsic @cindex @code{DSIN} intrinsic
@cindex @code{CSIN} intrinsic
@cindex @code{ZSIN} intrinsic @cindex @code{ZSIN} intrinsic
@cindex @code{CDSIN} intrinsic @cindex @code{CDSIN} intrinsic
@cindex trigonometric functions @cindex trigonometric functions
@ -8299,7 +8578,6 @@ Elemental function
@node SPREAD @node SPREAD
@section @code{SPREAD} --- Add a dimension to an array @section @code{SPREAD} --- Add a dimension to an array
@cindex @code{SPREAD} intrinsic @cindex @code{SPREAD} intrinsic
@ -8324,7 +8602,6 @@ Transformational function
@node SQRT @node SQRT
@section @code{SQRT} --- Square-root function @section @code{SQRT} --- Square-root function
@cindex @code{SQRT} intrinsic @cindex @code{SQRT} intrinsic
@ -8770,7 +9047,7 @@ Non-elemental function
The return value is a scalar of type @code{INTEGER(4)}. The return value is a scalar of type @code{INTEGER(4)}.
@item @emph{See also}: @item @emph{See also}:
@ref{CTIME}, @ref{GMTIME}, @ref{LTIME}, @ref{TIME8} @ref{CTIME}, @ref{GMTIME}, @ref{LTIME}, @ref{MCLOCK}, @ref{TIME8}
@end table @end table
@ -8809,7 +9086,7 @@ Non-elemental function
The return value is a scalar of type @code{INTEGER(8)}. The return value is a scalar of type @code{INTEGER(8)}.
@item @emph{See also}: @item @emph{See also}:
@ref{CTIME}, @ref{GMTIME}, @ref{LTIME}, @ref{TIME} @ref{CTIME}, @ref{GMTIME}, @ref{LTIME}, @ref{MCLOCK8}, @ref{TIME}
@end table @end table