comp.lang.ada
 help / color / mirror / Atom feed
From: "Mich" <katho@tr.cgocable.ca>
Subject: Re: Here my package
Date: Wed, 04 Apr 2001 17:06:19 GMT
Date: 2001-04-04T17:06:19+00:00	[thread overview]
Message-ID: <fwIy6.332$A24.155820@carnaval.risq.qc.ca> (raw)
In-Reply-To: 3ACB4E79.6A461BC3@boeing.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

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" <jeffrey.carter@boeing.com> 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





  reply	other threads:[~2001-04-04 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0rGy6.262$A24.137061@carnaval.risq.qc.ca>
2001-04-04 14:46 ` Here my package Ted Dennison
2001-04-04 14:56   ` Mich
2001-04-04 15:29     ` Marin David Condic
2001-04-04 15:57       ` Mich
2001-04-04 16:15         ` Marin David Condic
2001-04-04 16:40     ` Jeffrey Carter
2001-04-04 17:06       ` Mich [this message]
2001-04-04 18:41         ` Stephen Leake
2001-04-04 22:06         ` Jeffrey Carter
2001-04-05  4:20     ` DuckE
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox