From: Jeffrey Carter <jeffrey.carter@boeing.com>
Subject: Re: Here my package
Date: Wed, 4 Apr 2001 16:40:25 GMT
Date: 2001-04-04T16:40:25+00:00 [thread overview]
Message-ID: <3ACB4E79.6A461BC3@boeing.com> (raw)
In-Reply-To: hCGy6.263$A24.139307@carnaval.risq.qc.ca
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
next prev parent reply other threads:[~2001-04-04 16:40 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 [this message]
2001-04-04 17:06 ` Mich
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