* @code{CMPLX}: CMPLX, Complex conversion function
* @code{COMMAND_ARGUMENT_COUNT}: COMMAND_ARGUMENT_COUNT, Get number of command line arguments
* @code{COMPLEX}: COMPLEX, Complex conversion function
+* @code{COMPILER_VERSION}: COMPILER_VERSION, Compiler version string
+* @code{COMPILER_OPTIONS}: COMPILER_OPTIONS, Options passed to the compiler
* @code{CONJG}: CONJG, Complex conjugate function
* @code{COS}: COS, Cosine function
* @code{COSH}: COSH, Hyperbolic cosine function
Fortran 2008
@item @emph{Class}:
-Intrinsic function
+Inquiry function of the module @code{ISO_C_BINDING}
@item @emph{Syntax}:
@code{N = C_SIZEOF(X)}
@item @emph{Return value}:
The return value is of type integer and of the system-dependent kind
-@var{C_SIZE_T} (from the @var{ISO_C_BINDING} module). Its value is the
+@code{C_SIZE_T} (from the @code{ISO_C_BINDING} module). Its value is the
number of bytes occupied by the argument. If the argument has the
@code{POINTER} attribute, the number of bytes of the storage area pointed
to is returned. If the argument is of a derived type with @code{POINTER}
+@node COMPILER_OPTIONS
+@section @code{COMPILER_OPTIONS} --- Options passed to the compiler
+@fnindex COMPILER_OPTIONS
+@cindex flags inquiry function
+@cindex options inquiry function
+@cindex compiler flags inquiry function
+
+@table @asis
+@item @emph{Description}:
+@code{COMPILER_OPTIONS()} returns a string with the options used for
+compiling.
+
+@item @emph{Standard}:
+Fortran 2008
+
+@item @emph{Class}:
+Inquiry function of the module @code{ISO_FORTRAN_ENV}
+
+@item @emph{Syntax}:
+@code{STR = COMPILER_OPTIONS()}
+
+@item @emph{Arguments}:
+None.
+
+@item @emph{Return value}:
+The return value is a default-kind string with system-dependent length.
+It contains the compiler flags used to compile the file, which called
+the @code{COMPILER_OPTIONS} intrinsic.
+
+@item @emph{Example}:
+@smallexample
+ use iso_fortran_env
+ print '(4a)', 'This file was compiled by ', &
+ compiler_version(), ' using the the options ', &
+ compiler_options()
+ end
+@end smallexample
+
+@item @emph{See also}:
+@ref{COMPILER_VERSION}, @ref{ISO_FORTRAN_ENV}
+@end table
+
+
+
+@node COMPILER_VERSION
+@section @code{COMPILER_VERSION} --- Compiler version string
+@fnindex COMPILER_VERSION
+@cindex compiler, name and version
+@cindex version of the compiler
+
+@table @asis
+@item @emph{Description}:
+@code{COMPILER_VERSION()} returns a string with the name and the
+version of the compiler.
+
+@item @emph{Standard}:
+Fortran 2008
+
+@item @emph{Class}:
+Inquiry function of the module @code{ISO_FORTRAN_ENV}
+
+@item @emph{Syntax}:
+@code{STR = COMPILER_VERSION()}
+
+@item @emph{Arguments}:
+None.
+
+@item @emph{Return value}:
+The return value is a default-kind string with system-dependent length.
+It contains the name of the compiler and its version number.
+
+@item @emph{Example}:
+@smallexample
+ use iso_fortran_env
+ print '(4a)', 'This file was compiled by ', &
+ compiler_version(), ' using the the options ', &
+ compiler_options()
+ end
+@end smallexample
+
+@item @emph{See also}:
+@ref{COMPILER_OPTIONS}, @ref{ISO_FORTRAN_ENV}
+@end table
+
+
+
@node COMPLEX
@section @code{COMPLEX} --- Complex conversion function
@fnindex COMPLEX
@multitable @columnfractions .15 .70
@item @var{NUMBER} @tab Shall be a scalar of type @code{INTEGER} and of
default kind, @math{@var{NUMBER} \geq 0}
-@item @var{VALUE} @tab Shall be a scalar of type @code{CHARACTER}
+@item @var{VALUE} @tab (Optional) Shall be a scalar of type @code{CHARACTER}
and of default kind.
-@item @var{LENGTH} @tab (Option) Shall be a scalar of type @code{INTEGER}
+@item @var{LENGTH} @tab (Optional) Shall be a scalar of type @code{INTEGER}
and of default kind.
-@item @var{STATUS} @tab (Option) Shall be a scalar of type @code{INTEGER}
+@item @var{STATUS} @tab (Optional) Shall be a scalar of type @code{INTEGER}
and of default kind.
@end multitable
@multitable @columnfractions .15 .70
@item @var{NAME} @tab Shall be a scalar of type @code{CHARACTER}
and of default kind.
-@item @var{VALUE} @tab Shall be a scalar of type @code{CHARACTER}
+@item @var{VALUE} @tab (Optional) Shall be a scalar of type @code{CHARACTER}
and of default kind.
-@item @var{LENGTH} @tab Shall be a scalar of type @code{INTEGER}
+@item @var{LENGTH} @tab (Optional) Shall be a scalar of type @code{INTEGER}
and of default kind.
-@item @var{STATUS} @tab Shall be a scalar of type @code{INTEGER}
+@item @var{STATUS} @tab (Optional) Shall be a scalar of type @code{INTEGER}
and of default kind.
-@item @var{TRIM_NAME} @tab Shall be a scalar of type @code{LOGICAL}
+@item @var{TRIM_NAME} @tab (Optional) Shall be a scalar of type @code{LOGICAL}
and of default kind.
@end multitable
INTEGER(1) :: a(2)
a(1) = b'00100100'
- a(1) = b'01101010'
+ a(2) = b'01101010'
! prints 00100000
PRINT '(b8.8)', IALL(a)
@node IANY
-@section @code{IANY} --- Bitwise XOR of array elements
+@section @code{IANY} --- Bitwise OR of array elements
@fnindex IANY
@cindex array, OR
@cindex bits, OR of array elements
INTEGER(1) :: a(2)
a(1) = b'00100100'
- a(1) = b'01101010'
+ a(2) = b'01101010'
- ! prints 01111011
+ ! prints 01101110
PRINT '(b8.8)', IANY(a)
END PROGRAM
@end smallexample
INTEGER(1) :: a(2)
a(1) = b'00100100'
- a(1) = b'01101010'
+ a(2) = b'01101010'
- ! prints 10111011
+ ! prints 01001110
PRINT '(b8.8)', IPARITY(a)
END PROGRAM
@end smallexample
@item @emph{Example}:
@smallexample
PROGRAM test_leadz
- WRITE (*,*) LEADZ(1) ! prints 8 if BITSIZE(I) has the value 32
+ WRITE (*,*) BIT_SIZE(1) ! prints 32
+ WRITE (*,*) LEADZ(1) ! prints 31
END PROGRAM
@end smallexample
Fortran 2003 and later
@item @emph{Class}:
-Subroutine
+Pure subroutine
@item @emph{Syntax}:
@code{CALL MOVE_ALLOC(FROM, TO)}
denote that the lock variable is unlocked. (Fortran 2008 or later.)
@end table
+The module also provides the following intrinsic procedures:
+@ref{COMPILER_OPTIONS} and @ref{COMPILER_VERSION}.
+
@node ISO_C_BINDING
@item @code{C_F_PROCPOINTER}
@item @code{C_FUNLOC}
@item @code{C_LOC}
+@item @code{C_SIZEOF}
@end table
@c TODO: Vertical spacing between C_FUNLOC and C_LOC wrong in PDF,
@c don't really know why.