+@c This file is automatically derived from intdoc.c, intdoc.in,
+@c ansify.c, intrin.def, and intrin.h. Edit those files instead.
@menu
@ifset familyF2U
* Abort Intrinsic:: Abort the program.
@end ifset
@ifset familyF77
* ALog Intrinsic:: Natural logarithm (archaic).
-* ALog10 Intrinsic:: Natural logarithm (archaic).
+* ALog10 Intrinsic:: Common logarithm (archaic).
* AMax0 Intrinsic:: Maximum value (archaic).
* AMax1 Intrinsic:: Maximum value (archaic).
* AMin0 Intrinsic:: Minimum value (archaic).
@end ifset
@ifset familyF90
* Count Intrinsic:: (Reserved for future use.)
-* Cpu_Time Intrinsic:: Get current CPU time.
+* CPU_Time Intrinsic:: Get current CPU time.
* CShift Intrinsic:: (Reserved for future use.)
@end ifset
@ifset familyF77
* Date Intrinsic:: Get current date as dd-Mon-yy.
@end ifset
@ifset familyF90
-* Date_and_Time Intrinsic:: (Reserved for future use.)
+* Date_and_Time Intrinsic:: Get the current date and time.
@end ifset
@ifset familyF2U
* DbesJ0 Intrinsic:: Bessel function (archaic).
@ifset familyF77
* DInt Intrinsic:: Truncate to whole number (archaic).
* DLog Intrinsic:: Natural logarithm (archaic).
-* DLog10 Intrinsic:: Natural logarithm (archaic).
+* DLog10 Intrinsic:: Common logarithm (archaic).
* DMax1 Intrinsic:: Maximum value (archaic).
* DMin1 Intrinsic:: Minimum value (archaic).
* DMod Intrinsic:: Remainder (archaic).
* DTanH Intrinsic:: Hyperbolic tangent (archaic).
@end ifset
@ifset familyF2U
-* Dtime Intrinsic (subroutine):: Get elapsed time since last time.
+* DTime Intrinsic (subroutine):: Get elapsed time since last time.
@end ifset
@ifset familyBADU77
-* Dtime Intrinsic (function):: Get elapsed time since last time.
+* DTime Intrinsic (function):: Get elapsed time since last time.
@end ifset
@ifset familyF90
* EOShift Intrinsic:: (Reserved for future use.)
* Exponent Intrinsic:: (Reserved for future use.)
@end ifset
@ifset familyF2U
-* Fdate Intrinsic (subroutine):: Get current time as Day Mon dd hh:mm:ss yyyy.
-* Fdate Intrinsic (function):: Get current time as Day Mon dd hh:mm:ss yyyy.
+* FDate Intrinsic (subroutine):: Get current time as Day Mon dd hh:mm:ss yyyy.
+* FDate Intrinsic (function):: Get current time as Day Mon dd hh:mm:ss yyyy.
* FGet Intrinsic (subroutine):: Read a character from unit 5 stream-wise.
@end ifset
@ifset familyBADU77
@end ifset
@ifset familyF77
* Log Intrinsic:: Natural logarithm.
-* Log10 Intrinsic:: Natural logarithm.
+* Log10 Intrinsic:: Common logarithm.
@end ifset
@ifset familyF90
* Logical Intrinsic:: (Reserved for future use.)
value is computed as:
@example
-SQRT(REALPART(@var{A})**2, IMAGPART(@var{A})**2)
+SQRT(REALPART(@var{A})**2+IMAGPART(@var{A})**2)
@end example
@noindent
-Otherwise, it is computed by negating the @var{A} if
+Otherwise, it is computed by negating @var{A} if
it is negative, or returning @var{A}.
@xref{Sign Intrinsic}, for how to explicitly
@var{Seconds} seconds by using @code{alarm(1)} to set up a signal and
@code{signal(2)} to catch it.
If @var{Status} is supplied, it will be
-returned with the the number of seconds remaining until any previously
+returned with the number of seconds remaining until any previously
scheduled alarm was due to be delivered, or zero if there was no
previously scheduled alarm.
@xref{Signal Intrinsic (subroutine)}.
BesJN: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}.
@noindent
-@var{N}: @code{INTEGER}; scalar; INTENT(IN).
+@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN).
@noindent
@var{X}: @code{REAL}; scalar; INTENT(IN).
BesYN: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}.
@noindent
-@var{N}: @code{INTEGER}; scalar; INTENT(IN).
+@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN).
@noindent
@var{X}: @code{REAL}; scalar; INTENT(IN).
Sets the current working directory to be @var{Dir}.
If the @var{Status} argument is supplied, it contains 0
-on success or a non-zero error code otherwise upon return.
+on success or a nonzero error code otherwise upon return.
See @code{chdir(3)}.
+@emph{Caution:} Using this routine during I/O to a unit connected with a
+non-absolute file name can cause subsequent I/O on such a unit to fail
+because the I/O library might reopen files by name.
+
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
(optional) @var{Status} argument.
Description:
Sets the current working directory to be @var{Dir}.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
See @code{chdir(3)}.
+@emph{Caution:} Using this routine during I/O to a unit connected with a
+non-absolute file name can cause subsequent I/O on such a unit to fail
+because the I/O library might reopen files by name.
+
Due to the side effects performed by this intrinsic, the function
form is not recommended.
character.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
Note that this currently works
by actually invoking @code{/bin/chmod} (or the @code{chmod} found when
-the library was configured) and so may fail in some circumstances and
+the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Some non-GNU implementations of Fortran provide this intrinsic as
Currently, @var{Name} must not contain the single quote
character.
-Returns 0 on success or a non-zero error code otherwise.
+Returns 0 on success or a nonzero error code otherwise.
Note that this currently works
by actually invoking @code{/bin/chmod} (or the @code{chmod} found when
-the library was configured) and so may fail in some circumstances and
+the library was configured) and so might fail in some circumstances and
will, anyway, be slow.
Due to the side effects performed by this intrinsic, the function
Use @samp{EXTERNAL Count} to use this name for an
external procedure.
-@node Cpu_Time Intrinsic
-@subsubsection Cpu_Time Intrinsic
-@cindex Cpu_Time intrinsic
-@cindex intrinsics, Cpu_Time
+@node CPU_Time Intrinsic
+@subsubsection CPU_Time Intrinsic
+@cindex CPU_Time intrinsic
+@cindex intrinsics, CPU_Time
@noindent
@example
-CALL Cpu_Time(@var{Seconds})
+CALL CPU_Time(@var{Seconds})
@end example
@noindent
-@var{Seconds}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
+@var{Seconds}: @code{REAL}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{f90}.
This implementation of the Fortran 95 intrinsic is just an alias for
@code{second} @xref{Second Intrinsic (subroutine)}.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
@node CShift Intrinsic
@subsubsection CShift Intrinsic
@cindex CShift intrinsic
@noindent
@example
-CALL CTime(@var{Result}, @var{STime})
+CALL CTime(@var{STime}, @var{Result})
@end example
@noindent
-@var{Result}: @code{CHARACTER}; scalar; INTENT(OUT).
+@var{STime}: @code{INTEGER}; scalar; INTENT(IN).
@noindent
-@var{STime}: @code{INTEGER}; scalar; INTENT(IN).
+@var{Result}: @code{CHARACTER}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
Returns @var{Date} in the form @samp{@var{dd}-@var{mmm}-@var{yy}},
representing the numeric day of the month @var{dd}, a three-character
abbreviation of the month name @var{mmm} and the last two digits of
-the year @var{yy}, e.g.@ @samp{25-Nov-96}.
+the year @var{yy}, e.g.@: @samp{25-Nov-96}.
+@cindex Y2K compliance
+@cindex Year 2000 compliance
This intrinsic is not recommended, due to the year 2000 approaching.
+Therefore, programs making use of this intrinsic
+might not be Year 2000 (Y2K) compliant.
@xref{CTime Intrinsic (subroutine)}, for information on obtaining more digits
for the current (or any) date.
@cindex Date_and_Time intrinsic
@cindex intrinsics, Date_and_Time
-This intrinsic is not yet implemented.
-The name is, however, reserved as an intrinsic.
-Use @samp{EXTERNAL Date_and_Time} to use this name for an
-external procedure.
+@noindent
+@example
+CALL Date_and_Time(@var{Date}, @var{Time}, @var{Zone}, @var{Values})
+@end example
+
+@noindent
+@var{Date}: @code{CHARACTER}; scalar; INTENT(OUT).
+
+@noindent
+@var{Time}: @code{CHARACTER}; OPTIONAL; scalar; INTENT(OUT).
+
+@noindent
+@var{Zone}: @code{CHARACTER}; OPTIONAL; scalar; INTENT(OUT).
+
+@noindent
+@var{Values}: @code{INTEGER(KIND=1)}; OPTIONAL; DIMENSION(8); INTENT(OUT).
+
+@noindent
+Intrinsic groups: @code{f90}.
+
+@noindent
+Description:
+
+Returns:
+@table @var
+@item Date
+The date in the form @var{ccyymmdd}: century, year, month and day;
+@item Time
+The time in the form @samp{@var{hhmmss.ss}}: hours, minutes, seconds
+and milliseconds;
+@item Zone
+The difference between local time and UTC (GMT) in the form @var{Shhmm}:
+sign, hours and minutes, e.g.@: @samp{-0500} (winter in New York);
+@item Values
+The year, month of the year, day of the month, time difference in
+minutes from UTC, hour of the day, minutes of the hour, seconds
+of the minute, and milliseconds
+of the second in successive values of the array.
+@end table
+
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
+On systems where a millisecond timer isn't available, the millisecond
+value is returned as zero.
@end ifset
@ifset familyF2U
DbesJN: @code{REAL(KIND=2)} function.
@noindent
-@var{N}: @code{INTEGER}; scalar; INTENT(IN).
+@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN).
@noindent
@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN).
DbesYN: @code{REAL(KIND=2)} function.
@noindent
-@var{N}: @code{INTEGER}; scalar; INTENT(IN).
+@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN).
@noindent
@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN).
@end ifset
@ifset familyF2U
-@node Dtime Intrinsic (subroutine)
-@subsubsection Dtime Intrinsic (subroutine)
-@cindex Dtime intrinsic
-@cindex intrinsics, Dtime
+@node DTime Intrinsic (subroutine)
+@subsubsection DTime Intrinsic (subroutine)
+@cindex DTime intrinsic
+@cindex intrinsics, DTime
@noindent
@example
-CALL Dtime(@var{Result}, @var{TArray})
+CALL DTime(@var{TArray}, @var{Result})
@end example
@noindent
-@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
+@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
@noindent
-@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
+@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
Subsequent invocations of @samp{DTIME()} set values based on accumulations
since the previous invocation.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
For information on other intrinsics with the same name:
-@xref{Dtime Intrinsic (function)}.
+@xref{DTime Intrinsic (function)}.
@end ifset
@ifset familyBADU77
-@node Dtime Intrinsic (function)
-@subsubsection Dtime Intrinsic (function)
-@cindex Dtime intrinsic
-@cindex intrinsics, Dtime
+@node DTime Intrinsic (function)
+@subsubsection DTime Intrinsic (function)
+@cindex DTime intrinsic
+@cindex intrinsics, DTime
@noindent
@example
-Dtime(@var{TArray})
+DTime(@var{TArray})
@end example
@noindent
-Dtime: @code{REAL(KIND=1)} function.
+DTime: @code{REAL(KIND=1)} function.
@noindent
@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
Subsequent invocations of @samp{DTIME()} return values accumulated since the
previous invocation.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
Due to the side effects performed by this intrinsic, the function
form is not recommended.
For information on other intrinsics with the same name:
-@xref{Dtime Intrinsic (subroutine)}.
+@xref{DTime Intrinsic (subroutine)}.
@end ifset
@ifset familyF90
Description:
Returns the complementary error function of @var{X}:
-@samp{ERFC(R) = 1 - ERF(R)} (except that the result may be more
+@samp{ERFC(R) = 1 - ERF(R)} (except that the result might be more
accurate than explicitly evaluating that formulae would give).
See @code{erfc(3m)}, which provides the implementation.
@noindent
@example
-CALL ETime(@var{Result}, @var{TArray})
+CALL ETime(@var{TArray}, @var{Result})
@end example
@noindent
-@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
+@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
@noindent
-@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT).
+@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
and @samp{@var{TArray}(2)} respectively.
The value of @var{Result} is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
and @samp{@var{TArray}(2)} respectively.
The functions' value is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
For information on other intrinsics with the same name:
@xref{ETime Intrinsic (subroutine)}.
@end example
@noindent
-@var{Status}: @code{INTEGER}; OPTIONAL; scalar; INTENT(IN).
+@var{Status}: @code{INTEGER} not wider than the default kind; OPTIONAL; scalar; INTENT(IN).
@noindent
Intrinsic groups: @code{unix}.
@end ifset
@ifset familyF2U
-@node Fdate Intrinsic (subroutine)
-@subsubsection Fdate Intrinsic (subroutine)
-@cindex Fdate intrinsic
-@cindex intrinsics, Fdate
+@node FDate Intrinsic (subroutine)
+@subsubsection FDate Intrinsic (subroutine)
+@cindex FDate intrinsic
+@cindex intrinsics, FDate
@noindent
@example
-CALL Fdate(@var{Date})
+CALL FDate(@var{Date})
@end example
@noindent
CALL CTIME(@var{Date}, TIME8())
@end example
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
@xref{CTime Intrinsic (subroutine)}.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine.
For information on other intrinsics with the same name:
-@xref{Fdate Intrinsic (function)}.
+@xref{FDate Intrinsic (function)}.
-@node Fdate Intrinsic (function)
-@subsubsection Fdate Intrinsic (function)
-@cindex Fdate intrinsic
-@cindex intrinsics, Fdate
+@node FDate Intrinsic (function)
+@subsubsection FDate Intrinsic (function)
+@cindex FDate intrinsic
+@cindex intrinsics, FDate
@noindent
@example
-Fdate()
+FDate()
@end example
@noindent
-Fdate: @code{CHARACTER*(*)} function.
+FDate: @code{CHARACTER*(*)} function.
@noindent
Intrinsic groups: @code{unix}.
CTIME(TIME8())
@end example
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
@xref{CTime Intrinsic (function)}.
For information on other intrinsics with the same name:
-@xref{Fdate Intrinsic (subroutine)}.
+@xref{FDate Intrinsic (subroutine)}.
@node FGet Intrinsic (subroutine)
@subsubsection FGet Intrinsic (subroutine)
Description:
Attempts to move Fortran unit @var{Unit} to the specified
-@var{Offset}: absolute offset if @var{Offset}=0; relative to the
-current offset if @var{Offset}=1; relative to the end of the file if
-@var{Offset}=2.
-It branches to label @var{Whence} if @var{Unit} is
+@var{Offset}: absolute offset if @var{Whence}=0; relative to the
+current offset if @var{Whence}=1; relative to the end of the file if
+@var{Whence}=2.
+It branches to label @var{ErrLab} if @var{Unit} is
not open or if the call otherwise fails.
@node FStat Intrinsic (subroutine)
@enumerate
@item
-File mode
+Device ID
@item
Inode number
@item
-ID of device containing directory entry for file
-
-@item
-Device id (if relevant)
+File mode
@item
Number of links
Owner's gid
@item
+ID of device containing directory entry for file
+(0 if not available)
+
+@item
File size (bytes)
@item
Last file status change time
@item
-Preferred I/O block size
+Preferred I/O block size (-1 if not available)
@item
-Number of blocks allocated
+Number of blocks allocated (-1 if not available)
@end enumerate
Not all these elements are relevant on all systems.
If an element is not relevant, it is returned as 0.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
@enumerate
@item
-File mode
+Device ID
@item
Inode number
@item
-ID of device containing directory entry for file
-
-@item
-Device id (if relevant)
+File mode
@item
Number of links
Owner's gid
@item
+ID of device containing directory entry for file
+(0 if not available)
+
+@item
File size (bytes)
@item
Last file status change time
@item
-Preferred I/O block size
+Preferred I/O block size (-1 if not available)
@item
-Number of blocks allocated
+Number of blocks allocated (-1 if not available)
@end enumerate
Not all these elements are relevant on all systems.
If an element is not relevant, it is returned as 0.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
For information on other intrinsics with the same name:
@xref{FStat Intrinsic (subroutine)}.
@end example
@noindent
-@var{Pos}: @code{INTEGER}; scalar; INTENT(IN).
+@var{Pos}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN).
@noindent
@var{Value}: @code{CHARACTER}; scalar; INTENT(OUT).
Places the current working directory in @var{Name}.
If the @var{Status} argument is supplied, it contains 0
-success or a non-zero error code upon return
+success or a nonzero error code upon return
(@code{ENOSYS} if the system does not provide @code{getcwd(3)}
or @code{getwd(3)}).
Places the current working directory in @var{Name}.
Returns 0 on
-success, otherwise a non-zero error code
+success, otherwise a nonzero error code
(@code{ENOSYS} if the system does not provide @code{getcwd(3)}
or @code{getwd(3)}).
Returns the login name for the process in @var{Login}.
+@emph{Caution:} On some systems, the @code{getlogin(3)}
+function, which this intrinsic calls at run time,
+is either not implemented or returns a null pointer.
+In the latter case, this intrinsic returns blanks
+in @var{Login}.
+
@node GetPId Intrinsic
@subsubsection GetPId Intrinsic
@cindex GetPId intrinsic
Fills @var{Name} with the system's host name returned by
@code{gethostname(2)}.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return
+0 on success or a nonzero error code upon return
(@code{ENOSYS} if the system does not provide @code{gethostname(2)}).
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
(optional) @var{Status} argument.
+On some systems (specifically SCO) it might be necessary to link the
+``socket'' library if you call this routine.
+Typically this means adding @samp{-lg2c -lsocket -lm}
+to the @code{g77} command line when linking the program.
+
For information on other intrinsics with the same name:
@xref{HostNm Intrinsic (function)}.
Description:
Fills @var{Name} with the system's host name returned by
-@code{gethostname(2)}, returning 0 on success or a non-zero error code
+@code{gethostname(2)}, returning 0 on success or a nonzero error code
(@code{ENOSYS} if the system does not provide @code{gethostname(2)}).
+On some systems (specifically SCO) it might be necessary to link the
+``socket'' library if you call this routine.
+Typically this means adding @samp{-lg2c -lsocket -lm}
+to the @code{g77} command line when linking the program.
+
For information on other intrinsics with the same name:
@xref{HostNm Intrinsic (subroutine)}.
Returns the value of @var{I} with bit @var{Pos} cleared (set to
zero).
-@xref{BTest Intrinsic} for information on bit positions.
+@xref{BTest Intrinsic}, for information on bit positions.
@node IBits Intrinsic
@subsubsection IBits Intrinsic
Description:
Returns the value of @var{I} with bit @var{Pos} set (to one).
-@xref{BTest Intrinsic} for information on bit positions.
+@xref{BTest Intrinsic}, for information on bit positions.
@end ifset
@ifset familyF77
@noindent
Description:
-Fills @var{TArray} with the numerical values at the current local time
-of day, month (in the range 1--12), and year in elements 1, 2, and 3,
-respectively.
+Fills @var{TArray} with the numerical values at the current local time.
+The day (in the range 1--31), month (in the range 1--12),
+and year appear in elements 1, 2, and 3 of @var{TArray}, respectively.
The year has four significant digits.
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
For information on other intrinsics with the same name:
@xref{IDate Intrinsic (VXT)}.
Returns the numerical values of the current local time.
The month (in the range 1--12) is returned in @var{M},
-the day (in the range 1--7) in @var{D},
+the day (in the range 1--31) in @var{D},
and the year in @var{Y} (in the range 0--99).
-This intrinsic is not recommended, due to the year 2000 approaching.
+@cindex Y2K compliance
+@cindex Year 2000 compliance
+@cindex wraparound, Y2K
+@cindex limits, Y2K
+This intrinsic is not recommended, due to the fact that
+its return value for year wraps around century boundaries
+(change from a larger value to a smaller one).
+Therefore, programs making use of this intrinsic, for
+instance, might not be Year 2000 (Y2K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+as of the Year 2000.
+
+@xref{IDate Intrinsic (UNIX)}, for information on obtaining more digits
+for the current date.
For information on other intrinsics with the same name:
@xref{IDate Intrinsic (UNIX)}.
Int2: @code{INTEGER(KIND=6)} function.
@noindent
-@var{A}: @code{INTEGER}; scalar; INTENT(IN).
+@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN).
@noindent
Intrinsic groups: @code{gnu}.
to type @code{INTEGER(KIND=6)}.
If @var{A} is type @code{COMPLEX}, its real part
-is truncated and converted, and its imaginary part is disgregarded.
+is truncated and converted, and its imaginary part is disregarded.
@xref{Int Intrinsic}.
Int8: @code{INTEGER(KIND=2)} function.
@noindent
-@var{A}: @code{INTEGER}; scalar; INTENT(IN).
+@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN).
@noindent
Intrinsic groups: @code{gnu}.
to type @code{INTEGER(KIND=2)}.
If @var{A} is type @code{COMPLEX}, its real part
-is truncated and converted, and its imaginary part is disgregarded.
+is truncated and converted, and its imaginary part is disregarded.
@xref{Int Intrinsic}.
indicates no shift and @samp{@var{Shift}.LT.0} indicates a right shift.
If the absolute value of the shift count is greater than
@samp{BIT_SIZE(@var{I})}, the result is undefined.
-Bits shifted out from the left end or the right end, as the case may be,
-are lost.
+Bits shifted out from the left end or the right end are lost.
Zeros are shifted in from the opposite end.
-@xref{IShftC Intrinsic} for the circular-shift equivalent.
+@xref{IShftC Intrinsic}, for the circular-shift equivalent.
@node IShftC Intrinsic
@subsubsection IShftC Intrinsic
The rightmost @var{Size} bits of the argument @var{I}
are shifted circularly @var{Shift}
-places, i.e.@ the bits shifted out of one end are shifted into
+places, i.e.@: the bits shifted out of one end are shifted into
the opposite end.
No bits are lost.
The unshifted bits of the result are the same as
The value of @var{Size} must be greater than or equal to one and less than
or equal to @samp{BIT_SIZE(@var{I})}.
-@xref{IShft Intrinsic} for the logical shift equivalent.
+@xref{IShft Intrinsic}, for the logical shift equivalent.
@end ifset
@ifset familyF77
Sends the signal specified by @var{Signal} to the process @var{Pid}.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
See @code{kill(2)}.
Some non-GNU implementations of Fortran provide this intrinsic as
Description:
Sends the signal specified by @var{Signal} to the process @var{Pid}.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
See @code{kill(2)}.
Due to the side effects performed by this intrinsic, the function
the names in @var{Path1} and @var{Path2}---otherwise,
trailing blanks in @var{Path1} and @var{Path2} are ignored.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
See @code{link(2)}.
Some non-GNU implementations of Fortran provide this intrinsic as
A null character (@samp{CHAR(0)}) marks the end of
the names in @var{Path1} and @var{Path2}---otherwise,
trailing blanks in @var{Path1} and @var{Path2} are ignored.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
See @code{link(2)}.
Due to the side effects performed by this intrinsic, the function
@end example
@noindent
-Loc: @code{INTEGER(KIND=0)} function.
+Loc: @code{INTEGER(KIND=7)} function.
@noindent
@var{Entity}: Any type; cannot be a constant or expression.
@xref{Exp Intrinsic}, for the inverse of this function.
-@xref{Log10 Intrinsic}, for the base-10 logarithm function.
+@xref{Log10 Intrinsic}, for the `common' (base-10) logarithm function.
@node Log10 Intrinsic
@subsubsection Log10 Intrinsic
@noindent
Description:
-Returns the natural logarithm of @var{X}, which must
-be greater than zero or, if type @code{COMPLEX}, must not
-be zero.
+Returns the common logarithm (base 10) of @var{X}, which must
+be greater than zero.
The inverse of this function is @samp{10. ** LOG10(@var{X})}.
@enumerate
@item
-File mode
+Device ID
@item
Inode number
@item
-ID of device containing directory entry for file
-
-@item
-Device id (if relevant)
+File mode
@item
Number of links
Owner's gid
@item
+ID of device containing directory entry for file
+(0 if not available)
+
+@item
File size (bytes)
@item
Last file status change time
@item
-Preferred I/O block size
+Preferred I/O block size (-1 if not available)
@item
-Number of blocks allocated
+Number of blocks allocated (-1 if not available)
@end enumerate
Not all these elements are relevant on all systems.
If an element is not relevant, it is returned as 0.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return
+0 on success or a nonzero error code upon return
(@code{ENOSYS} if the system does not provide @code{lstat(2)}).
Some non-GNU implementations of Fortran provide this intrinsic as
@enumerate
@item
-File mode
+Device ID
@item
Inode number
@item
-ID of device containing directory entry for file
-
-@item
-Device id (if relevant)
+File mode
@item
Number of links
Owner's gid
@item
+ID of device containing directory entry for file
+(0 if not available)
+
+@item
File size (bytes)
@item
Last file status change time
@item
-Preferred I/O block size
+Preferred I/O block size (-1 if not available)
@item
-Number of blocks allocated
+Number of blocks allocated (-1 if not available)
@end enumerate
Not all these elements are relevant on all systems.
If an element is not relevant, it is returned as 0.
-Returns 0 on success or a non-zero error code
+Returns 0 on success or a nonzero error code
(@code{ENOSYS} if the system does not provide @code{lstat(2)}).
For information on other intrinsics with the same name:
Returns the number of clock ticks since the start of the process.
Supported on systems with @code{clock(3)} (q.v.).
+@cindex wraparound, timings
+@cindex limits, timings
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.
+
@xref{MClock8 Intrinsic}, for information on a
similar intrinsic that might be portable to more
GNU Fortran implementations, though to fewer
Returns the number of clock ticks since the start of the process.
Supported on systems with @code{clock(3)} (q.v.).
+@cindex wraparound, timings
+@cindex limits, timings
+@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 converted to an @samp{INTEGER(KIND=2)} 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.
+
No Fortran implementations other than GNU Fortran are
known to support this intrinsic at the time of this
writing.
trailing blanks in @var{Path1} and @var{Path2} are ignored.
See @code{rename(2)}.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
the names in @var{Path1} and @var{Path2}---otherwise,
trailing blanks in @var{Path1} and @var{Path2} are ignored.
See @code{rename(2)}.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
Due to the side effects performed by this intrinsic, the function
form is not recommended.
Returns the local time in seconds since midnight minus the value
@var{T}.
+@cindex wraparound, timings
+@cindex limits, timings
+This values returned by this intrinsic
+become numerically less than previous values
+(they wrap around) during a single run of the
+compiler program, under normal circumstances
+(such as running through the midnight hour).
+
@end ifset
@ifset familyF2U
@node Second Intrinsic (function)
Returns the process's runtime in seconds---the same value as the
UNIX function @code{etime} returns.
-This routine is known from Cray Fortran.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
For information on other intrinsics with the same name:
@xref{Second Intrinsic (subroutine)}.
@end example
@noindent
-@var{Seconds}: @code{REAL(KIND=1)}; scalar; INTENT(OUT).
+@var{Seconds}: @code{REAL}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
Returns the process's runtime in seconds in @var{Seconds}---the same value
as the UNIX function @code{etime} returns.
-This routine is known from Cray Fortran. @xref{Cpu_Time Intrinsic}
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
+This routine is known from Cray Fortran. @xref{CPU_Time Intrinsic},
for a standard equivalent.
For information on other intrinsics with the same name:
to type @code{INTEGER(KIND=6)}.
If @var{A} is type @code{COMPLEX}, its real part
-is truncated and converted, and its imaginary part is disgregarded.
+is truncated and converted, and its imaginary part is disregarded.
@xref{Int Intrinsic}.
or dummy/global @code{INTEGER(KIND=1)} scalar.
@noindent
-@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT).
+@var{Status}: @code{INTEGER(KIND=7)}; OPTIONAL; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
If @var{Handler} is a an @code{EXTERNAL} routine, arranges for it to be
invoked with a single integer argument (of system-dependent length)
when signal @var{Number} occurs.
-If @var{Number} is an integer, it can be
-used to turn off handling of signal @var{Handler} or revert to its default
+If @var{Handler} is an integer, it can be
+used to turn off handling of signal @var{Number} or revert to its default
action.
See @code{signal(2)}.
-Note that @var{Handler} will be called using C conventions, so its value in
+Note that @var{Handler} will be called using C conventions,
+so the value of its argument in Fortran terms
Fortran terms is obtained by applying @code{%LOC()} (or @var{LOC()}) to it.
The value returned by @code{signal(2)} is written to @var{Status}, if
only a function, not as a subroutine, or do not support the
(optional) @var{Status} argument.
+@emph{Warning:} Use of the @code{libf2c} run-time library function
+@samp{signal_} directly
+(such as via @samp{EXTERNAL SIGNAL})
+requires use of the @code{%VAL()} construct
+to pass an @code{INTEGER} value
+(such as @samp{SIG_IGN} or @samp{SIG_DFL})
+for the @var{Handler} argument.
+
+However, while @samp{CALL SIGNAL(@var{signum}, %VAL(SIG_IGN))}
+works when @samp{SIGNAL} is treated as an external procedure
+(and resolves, at link time, to @code{libf2c}'s @samp{signal_} routine),
+this construct is not valid when @samp{SIGNAL} is recognized
+as the intrinsic of that name.
+
+Therefore, for maximum portability and reliability,
+code such references to the @samp{SIGNAL} facility as follows:
+
+@smallexample
+INTRINSIC SIGNAL
+@dots{}
+CALL SIGNAL(@var{signum}, SIG_IGN)
+@end smallexample
+
+@code{g77} will compile such a call correctly,
+while other compilers will generally either do so as well
+or reject the @samp{INTRINSIC SIGNAL} statement via a diagnostic,
+allowing you to take appropriate action.
+
For information on other intrinsics with the same name:
@xref{Signal Intrinsic (function)}.
@end example
@noindent
-Signal: @code{INTEGER(KIND=1)} function.
+Signal: @code{INTEGER(KIND=7)} function.
@noindent
@var{Number}: @code{INTEGER}; scalar; INTENT(IN).
If @var{Handler} is a an @code{EXTERNAL} routine, arranges for it to be
invoked with a single integer argument (of system-dependent length)
when signal @var{Number} occurs.
-If @var{Number} is an integer, it can be
-used to turn off handling of signal @var{Handler} or revert to its default
+If @var{Handler} is an integer, it can be
+used to turn off handling of signal @var{Number} or revert to its default
action.
See @code{signal(2)}.
-Note that @var{Handler} will be called using C conventions, so its value in
-Fortran terms is obtained by applying @code{%LOC()} (or @var{LOC()}) to it.
+Note that @var{Handler} will be called using C conventions,
+so the value of its argument in Fortran terms
+is obtained by applying @code{%LOC()} (or @var{LOC()}) to it.
The value returned by @code{signal(2)} is returned.
Due to the side effects performed by this intrinsic, the function
form is not recommended.
+@emph{Warning:} If the returned value is stored in
+an @code{INTEGER(KIND=1)} (default @code{INTEGER}) argument,
+truncation of the original return value occurs on some systems
+(such as Alphas, which have 64-bit pointers but 32-bit default integers),
+with no warning issued by @code{g77} under normal circumstances.
+
+Therefore, the following code fragment might silently fail on
+some systems:
+
+@smallexample
+INTEGER RTN
+EXTERNAL MYHNDL
+RTN = SIGNAL(@var{signum}, MYHNDL)
+@dots{}
+! Restore original handler:
+RTN = SIGNAL(@var{signum}, RTN)
+@end smallexample
+
+The reason for the failure is that @samp{RTN} might not hold
+all the information on the original handler for the signal,
+thus restoring an invalid handler.
+This bug could manifest itself as a spurious run-time failure
+at an arbitrary point later during the program's execution,
+for example.
+
+@emph{Warning:} Use of the @code{libf2c} run-time library function
+@samp{signal_} directly
+(such as via @samp{EXTERNAL SIGNAL})
+requires use of the @code{%VAL()} construct
+to pass an @code{INTEGER} value
+(such as @samp{SIG_IGN} or @samp{SIG_DFL})
+for the @var{Handler} argument.
+
+However, while @samp{RTN = SIGNAL(@var{signum}, %VAL(SIG_IGN))}
+works when @samp{SIGNAL} is treated as an external procedure
+(and resolves, at link time, to @code{libf2c}'s @samp{signal_} routine),
+this construct is not valid when @samp{SIGNAL} is recognized
+as the intrinsic of that name.
+
+Therefore, for maximum portability and reliability,
+code such references to the @samp{SIGNAL} facility as follows:
+
+@smallexample
+INTRINSIC SIGNAL
+@dots{}
+RTN = SIGNAL(@var{signum}, SIG_IGN)
+@end smallexample
+
+@code{g77} will compile such a call correctly,
+while other compilers will generally either do so as well
+or reject the @samp{INTRINSIC SIGNAL} statement via a diagnostic,
+allowing you to take appropriate action.
+
For information on other intrinsics with the same name:
@xref{Signal Intrinsic (subroutine)}.
@noindent
Description:
-Reinitialises the generator with the seed in @var{Seed}.
+Reinitializes the generator with the seed in @var{Seed}.
@xref{IRand Intrinsic}.
@xref{Rand Intrinsic}.
@enumerate
@item
-File mode
+Device ID
@item
Inode number
@item
-ID of device containing directory entry for file
-
-@item
-Device id (if relevant)
+File mode
@item
Number of links
Owner's gid
@item
+ID of device containing directory entry for file
+(0 if not available)
+
+@item
File size (bytes)
@item
Last file status change time
@item
-Preferred I/O block size
+Preferred I/O block size (-1 if not available)
@item
-Number of blocks allocated
+Number of blocks allocated (-1 if not available)
@end enumerate
Not all these elements are relevant on all systems.
If an element is not relevant, it is returned as 0.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
Some non-GNU implementations of Fortran provide this intrinsic as
only a function, not as a subroutine, or do not support the
@enumerate
@item
-File mode
+Device ID
@item
Inode number
@item
-ID of device containing directory entry for file
-
-@item
-Device id (if relevant)
+File mode
@item
Number of links
Owner's gid
@item
+ID of device containing directory entry for file
+(0 if not available)
+
+@item
File size (bytes)
@item
Last file status change time
@item
-Preferred I/O block size
+Preferred I/O block size (-1 if not available)
@item
-Number of blocks allocated
+Number of blocks allocated (-1 if not available)
@end enumerate
Not all these elements are relevant on all systems.
If an element is not relevant, it is returned as 0.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
For information on other intrinsics with the same name:
@xref{Stat Intrinsic (subroutine)}.
the names in @var{Path1} and @var{Path2}---otherwise,
trailing blanks in @var{Path1} and @var{Path2} are ignored.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return
+0 on success or a nonzero error code upon return
(@code{ENOSYS} if the system does not provide @code{symlink(2)}).
Some non-GNU implementations of Fortran provide this intrinsic as
A null character (@samp{CHAR(0)}) marks the end of
the names in @var{Path1} and @var{Path2}---otherwise,
trailing blanks in @var{Path1} and @var{Path2} are ignored.
-Returns 0 on success or a non-zero error code
+Returns 0 on success or a nonzero error code
(@code{ENOSYS} if the system does not provide @code{symlink(2)}).
Due to the side effects performed by this intrinsic, the function
@var{Count}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT).
@noindent
-@var{Rate}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT).
+@var{Rate}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT).
@noindent
-@var{Max}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT).
+@var{Max}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{f90}.
in this implementation since it's just the maximum C @code{unsigned
int} value.
+@cindex wraparound, timings
+@cindex limits, timings
+On some systems, the underlying timings are represented
+using types with sufficiently small limits that overflows
+(wraparounds) are possible, such as 32-bit types.
+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.
+
@end ifset
@ifset familyF77
@node Tan Intrinsic
This value is suitable for passing to @code{CTIME},
@code{GMTIME}, and @code{LTIME}.
+@cindex wraparound, timings
+@cindex limits, timings
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.
+
@xref{Time8 Intrinsic}, for information on a
similar intrinsic that might be portable to more
GNU Fortran implementations, though to fewer
Returns in @var{Time} a character representation of the current time as
obtained from @code{ctime(3)}.
-@xref{Fdate Intrinsic (subroutine)} for an equivalent routine.
+@cindex Y10K compliance
+@cindex Year 10000 compliance
+@cindex wraparound, Y10K
+@cindex limits, Y10K
+Programs making use of this intrinsic
+might not be Year 10000 (Y10K) compliant.
+For example, the date might appear,
+to such programs, to wrap around
+(change from a larger value to a smaller one)
+as of the Year 10000.
+
+@xref{FDate Intrinsic (subroutine)}, for an equivalent routine.
For information on other intrinsics with the same name:
@xref{Time Intrinsic (UNIX)}.
This value is suitable for passing to @code{CTIME},
@code{GMTIME}, and @code{LTIME}.
+@cindex wraparound, timings
+@cindex limits, timings
+@emph{Warning:} this intrinsic does not increase the range
+of the timing values over that returned by @code{time(3)}.
+On a system with a 32-bit @code{time(3)},
+@code{TIME8} will return a 32-bit value,
+even though converted to an @samp{INTEGER(KIND=2)} 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.
+
No Fortran implementations other than GNU Fortran are
known to support this intrinsic at the time of this
writing.
@noindent
@example
-CALL TtyNam(@var{Name}, @var{Unit})
+CALL TtyNam(@var{Unit}, @var{Name})
@end example
@noindent
-@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT).
+@var{Unit}: @code{INTEGER}; scalar; INTENT(IN).
@noindent
-@var{Unit}: @code{INTEGER}; scalar; INTENT(IN).
+@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT).
@noindent
Intrinsic groups: @code{unix}.
Description:
Sets @var{Name} to the name of the terminal device open on logical unit
-@var{Unit} or a blank string if @var{Unit} is not connected to a
+@var{Unit} or to a blank string if @var{Unit} is not connected to a
terminal.
Some non-GNU implementations of Fortran provide this intrinsic as
the name in @var{File}---otherwise,
trailing blanks in @var{File} are ignored.
If the @var{Status} argument is supplied, it contains
-0 on success or a non-zero error code upon return.
+0 on success or a nonzero error code upon return.
See @code{unlink(2)}.
Some non-GNU implementations of Fortran provide this intrinsic as
A null character (@samp{CHAR(0)}) marks the end of
the name in @var{File}---otherwise,
trailing blanks in @var{File} are ignored.
-Returns 0 on success or a non-zero error code.
+Returns 0 on success or a nonzero error code.
See @code{unlink(2)}.
Due to the side effects performed by this intrinsic, the function