diff options
Diffstat (limited to 'gcc/f/intdoc.texi')
-rw-r--r-- | gcc/f/intdoc.texi | 409 |
1 files changed, 308 insertions, 101 deletions
diff --git a/gcc/f/intdoc.texi b/gcc/f/intdoc.texi index 1da381111c2..817124e0a1e 100644 --- a/gcc/f/intdoc.texi +++ b/gcc/f/intdoc.texi @@ -46,7 +46,7 @@ @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). @@ -240,7 +240,7 @@ @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). @@ -274,10 +274,10 @@ * 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.) @@ -297,8 +297,8 @@ * 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 @@ -530,7 +530,7 @@ @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.) @@ -2231,7 +2231,7 @@ 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 may reopen files by name. +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 @@ -2270,7 +2270,7 @@ 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 may reopen files by name. +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. @@ -2319,7 +2319,7 @@ If the @var{Status} argument is supplied, it contains 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 @@ -2369,7 +2369,7 @@ Returns 0 on success or a non-zero 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 @@ -2626,6 +2626,16 @@ Returns in @var{Seconds} the current value of the system time. 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 @@ -2966,7 +2976,11 @@ 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}. +@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. @@ -3012,10 +3026,22 @@ 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 and milliseconds +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. @@ -4087,14 +4113,14 @@ to one type for @var{X}. @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{Result}, @var{TArray}) @end example @noindent @@ -4119,26 +4145,36 @@ The value of @var{Result} is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}. 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). @@ -4159,11 +4195,21 @@ The functions' value is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}. 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 @@ -4237,7 +4283,7 @@ Intrinsic groups: @code{unix}. 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. @@ -4270,6 +4316,16 @@ and the user and system components of this in @samp{@var{TArray}(1)} 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. @@ -4305,6 +4361,16 @@ and the user and system components of this in @samp{@var{TArray}(1)} 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)}. @@ -4375,14 +4441,14 @@ external procedure. @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 @@ -4403,26 +4469,37 @@ Equivalent to: 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}. @@ -4438,10 +4515,21 @@ Equivalent to: 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) @@ -4896,10 +4984,10 @@ Intrinsic groups: @code{unix}. 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) @@ -4935,16 +5023,13 @@ extracted from the @code{stat} structure as returned by @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 @@ -4956,6 +5041,10 @@ Owner's uid Owner's gid @item +ID of device containing directory entry for file +(0 if not available) + +@item File size (bytes) @item @@ -4968,10 +5057,10 @@ Last modification time 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. @@ -5020,16 +5109,13 @@ extracted from the @code{stat} structure as returned by @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 @@ -5041,6 +5127,10 @@ Owner's uid Owner's gid @item +ID of device containing directory entry for file +(0 if not available) + +@item File size (bytes) @item @@ -5053,10 +5143,10 @@ Last modification time 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. @@ -5455,8 +5545,9 @@ 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, i.e.@: append -@samp{-lg2c -lsocket -lm} to the @code{g77} arguments. +``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)}. @@ -5488,8 +5579,9 @@ Fills @var{Name} with the system's host name returned by (@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, i.e.@: append -@samp{-lg2c -lsocket -lm} to the @code{g77} arguments. +``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)}. @@ -5652,7 +5744,7 @@ Description: 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 @@ -5716,7 +5808,7 @@ Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. 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 @@ -5806,6 +5898,17 @@ of day, month (in the range 1--12), and year in elements 1, 2, and 3, 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)}. @@ -5841,7 +5944,20 @@ The month (in the range 1--12) is returned in @var{M}, the day (in the range 1--7) in @var{D}, and the year in @var{Y} (in the range 0--99). +@cindex Y2K compliance +@cindex Year 2000 compliance +@cindex wraparound, Y2K +@cindex limits, Y2K 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. +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 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)}. @@ -6598,11 +6714,10 @@ All bits representing @var{I} are shifted @var{Shift} places. 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 @@ -6644,7 +6759,7 @@ must be less than or equal to @var{Size}. 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 @@ -7478,7 +7593,7 @@ be zero. @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 @@ -7502,9 +7617,8 @@ Intrinsic groups: (standard FORTRAN 77). @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})}. @@ -7644,16 +7758,13 @@ The values in this array are extracted from 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 @@ -7665,6 +7776,10 @@ Owner's uid Owner's gid @item +ID of device containing directory entry for file +(0 if not available) + +@item File size (bytes) @item @@ -7677,10 +7792,10 @@ Last modification time 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. @@ -7735,16 +7850,13 @@ The values in this array are extracted from 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 @@ -7756,6 +7868,10 @@ Owner's uid Owner's gid @item +ID of device containing directory entry for file +(0 if not available) + +@item File size (bytes) @item @@ -7768,10 +7884,10 @@ Last modification time 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. @@ -7991,9 +8107,16 @@ Description: 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 @@ -8024,6 +8147,19 @@ Description: 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. @@ -9128,6 +9264,14 @@ Description: 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) @@ -9152,6 +9296,16 @@ Description: Returns the process's runtime in seconds---the same value as the UNIX function @code{etime} returns. +@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)}. @@ -9177,7 +9331,17 @@ Description: 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: @@ -9723,16 +9887,13 @@ The values in this array are extracted from 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 @@ -9744,6 +9905,10 @@ Owner's uid Owner's gid @item +ID of device containing directory entry for file +(0 if not available) + +@item File size (bytes) @item @@ -9756,10 +9921,10 @@ Last modification time 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. @@ -9810,16 +9975,13 @@ The values in this array are extracted from 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 @@ -9831,6 +9993,10 @@ Owner's uid Owner's gid @item +ID of device containing directory entry for file +(0 if not available) + +@item File size (bytes) @item @@ -9843,10 +10009,10 @@ Last modification time 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. @@ -10071,6 +10237,16 @@ isn't in general. 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 @@ -10164,9 +10340,16 @@ Returns the current time encoded as an integer 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 @@ -10199,7 +10382,18 @@ Description: 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)}. @@ -10230,6 +10424,19 @@ Returns the current time encoded as a long integer 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. |