comp.lang.ada
 help / color / mirror / Atom feed
From: "Frank J. Lhota" <FrankLho.NOSPAM@rcn.com>
Subject: Re: null array constant in Ada 83
Date: Tue, 23 Jun 2009 05:30:25 -0400
Date: 2009-06-23T05:30:25-04:00	[thread overview]
Message-ID: <h1q7bj$sfh$1@news.albasani.net> (raw)
In-Reply-To: <4a4098dd$1@news.post.ch>

Martin Krischik wrote:
> Hi,
> 
> maintaining old code is such a great fun. Anybody know what goes where
> the 4 dots are (an appropriate N_Sel_List_Entry is declared).
> 
>    subtype T_Sel_Entries is Integer range 0 ..
> Selection_Types.Max_Selection_Results;
> 
>    type T_Sel_List is array (T_Sel_Entries range <>) of T_Sel_List_Entry;
> 
>    N_Sel_List : constant T_Sel_List (1 .. 0) := ....;
> 
> Or is it just plain impossible in Ada 83.
> 
> Regards
> 
> Martin

If N_Sel_Entry_Value is a value of type N_Sel_List_Entry, then you could 
write

    N_Sel_List : constant T_Sel_List (1 .. 0) :=
       (1 .. 0 => N_Sel_Entry_Value);

The fact that you have to provide a component value that is never used 
is a well known annoyance.
-- 
"All things extant in this world,
Gods of Heaven, gods of Earth,
Let everything be as it should be;
Thus shall it be!"
- Magical chant from "Magical Shopping Arcade Abenobashi"

"Drizzle, Drazzle, Drozzle, Drome,
Time for this one to come home!"
- Mr. Wizard from "Tooter Turtle"



  parent reply	other threads:[~2009-06-23  9:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23  8:57 null array constant in Ada 83 Martin Krischik
2009-06-23  9:26 ` Peter Hermann
2009-06-23  9:30 ` Frank J. Lhota [this message]
2009-06-23 12:04   ` Martin Krischik
2009-06-23 13:05     ` Jean-Pierre Rosen
2009-06-23 14:11     ` anon
2009-06-23  9:31 ` AdaMagica
replies disabled

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