comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Pre-Elaboration clarification.
Date: Fri, 9 Nov 2001 17:45:35 -0500
Date: 2001-11-09T17:45:35-05:00	[thread overview]
Message-ID: <tuomu32t6sb9@corp.supernews.com> (raw)
In-Reply-To: YAyF7.232247$K6.111187950@news2


"Clueless" <chris@dont.spam.me> wrote in message
news:YAyF7.232247$K6.111187950@news2...
> In my Ada spec file, I have the declaration...
>
> type Int_Data is array(1..Argument_Count) of Integer;

Don't do it this way.  Just declare an unconstrained array type:

type Integer_Array is array (Positive range <>) of Integer;

The spec that declares the Integer_Array type shouldn't depend on package
Command_Line.  This is unnecessary coupling between specs.

I'll be talking about this sort of thing at next year's Ada Europe
conference in Austria.  (Assuming the committee accepts my tutorial
proposal.)


> Now, as you may have guessed, the point of this declaration is to create
> an array of the type Integer that has as many elements as there are
> arguments on the command line.(To be used for assigning numbers to the
> array.)
>
> function Multiply(Some_numbers : in Int_Data) return Integer;
> in the same spec file.

function Multiply (N : in Integer_Array) return Integer;







  parent reply	other threads:[~2001-11-09 22:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05 15:52 Pre-Elaboration clarification Clueless
2001-11-05 17:49 ` Jeffrey Carter
2001-11-09 22:45 ` Matthew Heaney [this message]
2001-11-22 15:46   ` Clueless
2001-11-28 17:55     ` Matthew Heaney
2001-11-28 18:12       ` WAS " Mark Lundquist
2001-11-28 18:46     ` Mark Lundquist
2001-11-28 20:13       ` Matthew Heaney
2001-11-29  9:34         ` Simon Wright
2001-11-10  6:31 ` Robert Dewar
replies disabled

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