From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e6b057440a987c7a X-Google-Attributes: gid103376,public From: johnherro@aol.com (John Herro) Subject: Re: HELP NEEDED !! URGENT !! Date: 1999/02/22 Message-ID: <19990222093955.21207.00000818@ngol04.aol.com>#1/1 X-Deja-AN: 447086366 References: <7arl83$qac$1@wolfenstein.adesium-services.fr> X-Admin: news@aol.com Organization: AOL http://www.aol.com Newsgroups: comp.lang.ada Date: 1999-02-22T00:00:00+00:00 List-Id: writes: > Could someone tell me how I can ... do input/output > on an object of type TIME of the package Ada.Calendar_IO ? Since type Time is private and the package Ada.Calendar_IO provides no input/output functions, you can't directly input or output objects of type Time. However, you can use procedure Split to convert an object of type Time to into Year (type Integer), Month (type Integer), Day (type Integer), and Seconds (type Duration, a fixed-point type). You can then output these types. For example, if Y is the Year, you can write Ada.Text_IO.Put(Integer'Image(Y));. For input, you can input the Year, Month, Day, and Seconds, and then use function Time_Of to convert to an object of type Time. The easiest way to input the Year, for example, is to use Get_Line and then convert the String to the Year. For example, S : String(1 .. 80); Len : Natural; Y : Ada.Calendar.Year_Number; ... Ada.Text_IO.Get_Line(Item => S, Last => Len); Y := Integer'Value(S(1 .. Len)); I hope this helps. - John Herro You can download a shareware AdaTutor program at http://members.aol.com/AdaTutor