intdoc.in: Add entry for DATE_AND_TIME.
authorDave Love <d.love@dl.ac.uk>
Mon, 6 Jul 1998 08:29:31 +0000 (08:29 +0000)
committerDave Love <fx@gcc.gnu.org>
Mon, 6 Jul 1998 08:29:31 +0000 (08:29 +0000)
1998-07-05  Dave Love  <d.love@dl.ac.uk>
* intdoc.in: Add entry for DATE_AND_TIME.
* intrin.def: Add implementation for DATE_AND_TIME.  Make second
and third args of SYSTEM_CLOCK optional.
* com.c (ffecom_expr_intrinsic_): New case for DATE_AND_TIME.
* com-rt.def (FFECOM_gfrtSYSTEM_CLOCK): Call G77_system_clock_0,
not system_clock_.
(FFECOM_gfrtDATE_AND_TIME): New DEFGFRT.

From-SVN: r20938

gcc/f/ChangeLog
gcc/f/com-rt.def
gcc/f/com.c
gcc/f/intdoc.in
gcc/f/intdoc.texi
gcc/f/intrin.def

index 9f8068f47021bf59f69a97496a89d3fb33342a2e..25d3640ce921dba678f7c215caef9e74a6cc73d9 100644 (file)
@@ -1,3 +1,16 @@
+1998-07-05  Dave Love  <d.love@dl.ac.uk>
+
+       * intdoc.in: Add entry for DATE_AND_TIME.
+
+       * intrin.def: Add implementation for DATE_AND_TIME.  Make second
+       and third args of SYSTEM_CLOCK optional.
+
+       * com.c (ffecom_expr_intrinsic_): New case for DATE_AND_TIME.
+
+       * com-rt.def (FFECOM_gfrtSYSTEM_CLOCK): Call G77_system_clock_0,
+       not system_clock_.
+       (FFECOM_gfrtDATE_AND_TIME): New DEFGFRT.
+
 Wed Jul  1 11:19:13 1998  Craig Burley  <burley@gnu.org>
 
        Fix 980701-1.f (which was producing "unaligned trap"
index 111085f56e8d4019a8889186fd223a87082378e9..6ceaf17db762d29e7bcfabb44805bc738b21482b 100644 (file)
@@ -143,6 +143,7 @@ DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtDATE, "G77_date_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
+DEFGFRT (FFECOM_gfrtDATE_AND_TIME, "G77_date_and_time_0", FFECOM_rttypeVOID_, "&a&a&a&i", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtL_BESJ0, "j0", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtL_BESJ1, "j1", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtL_BESJN, "jn", FFECOM_rttypeDOUBLE_, "id", FALSE, FALSE)
@@ -234,7 +235,7 @@ DEFGFRT (FFECOM_gfrtSRAND, "G77_srand_0", FFECOM_rttypeVOID_, "&i", FALSE, FALSE
 DEFGFRT (FFECOM_gfrtSTAT, "G77_stat_0", FFECOM_rttypeINTEGER_, "&a&i", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtSYMLNK, "G77_symlnk_0", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtSYSTEM, "G77_system_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE)
-DEFGFRT (FFECOM_gfrtSYSTEM_CLOCK, "system_clock_", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
+DEFGFRT (FFECOM_gfrtSYSTEM_CLOCK, "G77_system_clock_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtTAN, "r_tan", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtTANH, "r_tanh", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE)
 DEFGFRT (FFECOM_gfrtTIME, "G77_time_0", FFECOM_rttypeLONGINT_, 0, FALSE, FALSE)
index e6e4f6ec33b23edac5d773f60a6df890a82124a4..d2ff346b0ff05eab438c5807dcc6246cca201adf 100644 (file)
@@ -5204,6 +5204,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
     case FFEINTRIN_impCHDIR_func:
     case FFEINTRIN_impCHMOD_func:
     case FFEINTRIN_impDATE:
+    case FFEINTRIN_impDATE_AND_TIME:
     case FFEINTRIN_impDBESJ0:
     case FFEINTRIN_impDBESJ1:
     case FFEINTRIN_impDBESJN:
index 1ef6a94be68a54495b105ac6dc7d6c5e4d81fb18..b661d6e5dc2934a5fa6251607e887b6720850728 100644 (file)
@@ -2468,3 +2468,24 @@ scheduled alarm was due to be delivered, or zero if there was no
 previously scheduled alarm.
 @xref{Signal Intrinsic (subroutine)}.
 ")
+
+DEFDOC (DATE_AND_TIME, "Get the current date and time.", "\
+Returns:
+@table @var
+@item @1@
+The date in the form @var{ccyymmdd}: century, year, month and day;
+@item @2@
+The time in the form @samp{@var{hhmmss.ss}}: hours, minutes, seconds
+and milliseconds;
+@item @3@
+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 @4@
+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
+of the second in successive values of the array.
+@end table
+
+On systems where a millisecond timer isn't available, the millisecond
+value is returned as zero.
+")
index 74153db4fddeb448b8a3ca6f47704b1d9e21bb56..cad98a74096c2647c76b94e6771428a0a4272342 100644 (file)
 * 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).
@@ -2977,10 +2977,46 @@ 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{Ftime}, @var{Zone}, @var{Values})
+@end example
+
+@noindent
+@var{Date}: @code{CHARACTER}; scalar; INTENT(OUT).
+
+@noindent
+@var{Ftime}: @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 Ftime
+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 and milliseconds
+of the second in successive values of the array.
+@end table
+On systems where a millisecond timer isn't available, the millisecond
+value is returned as zero.
 
 @end ifset
 @ifset familyF2U
@@ -10006,10 +10042,10 @@ CALL System_Clock(@var{Count}, @var{Rate}, @var{Max})
 @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}.
index 29766543c8ff7e4d74d93744d6d82ae4dd7cde60..0c00dccfb016c3e81d7979c0665c59cd11487f3e 100644 (file)
@@ -1377,7 +1377,7 @@ DEFSPEC (DATE_AND_TIME,
     "DATE_AND_TIME",
     FALSE,
     FFEINTRIN_familyF90,
-    FFEINTRIN_impNONE
+    FFEINTRIN_impDATE_AND_TIME
   )
 DEFSPEC (DBESJ0,
     "DBESJ0",
@@ -3233,6 +3233,7 @@ DEFIMP    (CPU_TIME,      "CPU_TIME",     SECOND,,,       "--:-:Seconds=R*w")
 DEFIMP (CTIME_func,    "CTIME_func",   CTIME,,,        "A1*:-:STime=I*")
 DEFIMP (CTIME_subr,    "CTIME_subr",   CTIME,,,        "--:-:Result=A1w,STime=I*")
 DEFIMP (DATE,          "DATE",         DATE,,,         "--:-:Date=A1w")
+DEFIMP (DATE_AND_TIME, "DATE_AND_TIME", DATE_AND_TIME,,, "--:-:Date=A1w,Time=?A1w,Zone=?A1w,Values=?I1(8)w")
 DEFIMP (DBESJ0,        "DBESJ0",       L_BESJ0,,,      "R2:-:X=R2")
 DEFIMP (DBESJ1,        "DBESJ1",       L_BESJ1,,,      "R2:-:X=R2")
 DEFIMP (DBESJN,        "DBESJN",       L_BESJN,,,      "R2:-:N=I*,X=R2")
@@ -3336,7 +3337,7 @@ DEFIMP    (SYMLNK_func,   "SYMLNK_func",  SYMLNK,,,       "I1:-:Path1=A1,Path2=A1")
 DEFIMP (SYMLNK_subr,   "SYMLNK_subr",  SYMLNK,,,       "--:-:Path1=A1,Path2=A1,Status=?I1w")
 DEFIMP (SYSTEM_func,   "SYSTEM_func",  SYSTEM,SYSTEM,SYSTEM,"I1:-:Command=A1")
 DEFIMP (SYSTEM_subr,   "SYSTEM_subr",  SYSTEM,,,       "--:-:Command=A1,Status=?I1w")
-DEFIMP (SYSTEM_CLOCK,  "SYSTEM_CLOCK", SYSTEM_CLOCK,,, "--:-:Count=I1w,Rate=I1w,Max=I1w")
+DEFIMP (SYSTEM_CLOCK,  "SYSTEM_CLOCK", SYSTEM_CLOCK,,, "--:-:Count=I1w,Rate=?I1w,Max=?I1w")
 DEFIMP (TIME8,         "TIME8",        TIME,,,         "I2:-:")
 DEFIMP (TIME_unix,     "TIME_unix",    TIME,,,         "I1:-:")
 DEFIMP (TIME_vxt,      "TIME_vxt",     VXTTIME,,,      "--:-:Time=A1[8]w")