Quote:
>Anyone know how to access the DATE on the VAX???
This is standard Ada. Use Calendar operations to get the date. Here is
a sample:
WITH Calendar, Text_IO;
PROCEDURE TodayDate IS
PACKAGE My_Int_IO IS NEW Text_IO.Integer_IO(Num => Integer);
-- Finds and displays today's date in the form mm/dd/yy
-- The date is gotten from PACKAGE Calendar
Right_Now : Calendar.Time; -- holds internal clock value
This_Year : Calendar.Year_Number; -- holds current year
This_Month : Calendar.Month_Number; -- holds current month
This_Day : Calendar.Day_Number; -- holds current day
Last_Two_Digits : Natural;
This_century : CONSTANT Integer := 1900;
BEGIN -- TodayDate
-- Get the current time value from the computer's clock
Right_Now := Calendar.Clock;
-- Extract the current month, day, and year from the time value
This_Month := Calendar.Month(Date => Right_Now);
This_Day := Calendar.Day (Date => Right_Now);
This_Year := Calendar.Year (Date => Right_Now);
-- Format and display the date
Last_Two_Digits := This_Year - This_Century;
Text_IO.Put (Item => "Today's date is ");
My_Int_IO.Put (Item => This_Month, Width => 1);
Text_IO.Put (Item => '/');
My_Int_IO.Put (Item => This_Day, Width => 1);
Text_IO.Put (Item => '/');
My_Int_IO.Put (Item => Last_Two_Digits, Width => 1);
Text_IO.New_Line;
END TodayDate;
Good luck.
Mike
-------------------------------------------------------------------------------
Michael B. Feldman co-chair, SIGAda Education Committee
Visiting Professor 1991-92 Professor
Dept. of Comp. Sci. and Engrg. Dept. of Elect. Engrg. and Comp. Sci.
University of Washington FR-35 The George Washington University
Seattle, WA 98105 Washington, DC 20052
(206) 632-3794 (voice) (202) 994-5253 (voice)
(206) 543-2969 (fax) (202) 994-5296 (fax)
-------------------------------------------------------------------------------