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=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,611fb023d16b157d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-04 10:08:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!howland.erols.net!sunqbc.risq.qc.ca!carnaval.risq.qc.ca.POSTED!not-for-mail From: "Mich" Newsgroups: comp.lang.ada References: <0rGy6.262$A24.137061@carnaval.risq.qc.ca> <3ACB4E79.6A461BC3@boeing.com> Subject: Re: Here my package X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Wed, 04 Apr 2001 17:06:19 GMT NNTP-Posting-Host: 24.226.171.64 X-Complaints-To: abuse@cgocable.ca X-Trace: carnaval.risq.qc.ca 986403979 24.226.171.64 (Wed, 04 Apr 2001 13:06:19 EDT) NNTP-Posting-Date: Wed, 04 Apr 2001 13:06:19 EDT Xref: supernews.google.com comp.lang.ada:6464 Date: 2001-04-04T17:06:19+00:00 List-Id: The requirement is with the function that i already got is to put everything in my procedure but i don't know how : that my real problem...i work on that for about 3 days and i don't know how to... if you could help tahnx "Jeffrey Carter" a �crit dans le message news: 3ACB4E79.6A461BC3@boeing.com... > Mich wrote: > > > > ok here my package and i need to create a procedure named Date_Valide > > but i don't know how. my package goes like that: > > Actually, it looks as if you know how to create a function. Procedures > are similar, but don't return a value: > > procedure Date_Valide is > -- null; > begin -- Date_Valide > null; > end Date_Valide; > > If I knew the requirements for procedure Date_Valide I could perhaps be > more helpful. > > > PACKAGE lesdates IS > > TYPE Date IS RECORD > > Jour : Natural; > > Mois : Natural; > > Ann�e : Natural; > > END RECORD; > > So, what does zero mean as a year? A number not in 1 .. 12 for a month? > A number not in 1 .. 31 for a day? You should take a look at > Ada.Calendar, and perhaps use some of the subtypes defined there: > > type Date is record > Ann�e : Positive; > Mois : Ada.Calendar.Month_Number; > Jour : Ada.Calendar.Day_Number; > end record; > > This would make validating dates much easier. > > Jeffrey Carter