From: Philip Anderson <phil.anderson@amsjv.com>
Subject: Re: Stream_Element_Array and an empty array
Date: Thu, 23 Aug 2001 09:37:50 +0100
Date: 2001-08-23T09:37:50+01:00 [thread overview]
Message-ID: <3B84C0DE.79F20395@amsjv.com> (raw)
In-Reply-To: 3B83C03F.8F1A6357@gsde.hou.us.ray.com
"Samuel T. Harris" wrote:
>
<snip>
> Given that in the above text A is a variable,
> no assignment is necesary. If you must have
> an assignment, or an initial expression
> because it is constant, then you can
> do the following ...
>
> nil : constant stream_element_array (1..0) := (others => 0);
> ...
> a := nil;
That must the clearest Ada way of obtaining a zero-length array of a
particular type; declare an example and give it a suitable name (Nil,
Empty_Array, Zero_Length_Array, whatever), since the result of this
particular Ada idiom is easier to understand given this clue. It then
becomes obvious what you are doing when you pass it as a parameter.
--
hwyl/cheers,
Philip Anderson
Alenia Marconi Systems
Cwmbr�n, Cymru/Wales
next prev parent reply other threads:[~2001-08-23 8:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-22 13:34 Stream_Element_Array and an empty array
2001-08-22 13:42 ` Samuel Tardieu
2001-08-22 13:56 ` Reivilo Snuved
2001-08-22 14:19 `
2001-08-22 14:25 `
2001-08-22 14:28 ` Florian Weimer
2001-08-22 14:37 `
2001-08-22 14:28 ` David C. Hoos
2001-08-22 15:13 ` Claude SIMON
2001-08-22 14:54 ` Ted Dennison
2001-08-22 14:22 ` Samuel T. Harris
2001-08-23 8:37 ` Philip Anderson [this message]
2001-08-23 14:02 ` Samuel T. Harris
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox