From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!news.glorb.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Surprise in array concatenation Date: 05 Sep 2005 19:52:11 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <14muavojz308w.1ouv7xin79rqu$.dlg@40tude.net> <87fyspgqrm.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls4.std.com 1125964331 22799 192.74.137.71 (5 Sep 2005 23:52:11 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 5 Sep 2005 23:52:11 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4458 Date: 2005-09-05T19:52:11-04:00 List-Id: Jean-Pierre Rosen writes: > Robert A Duff a �crit : > > Why would you want an unconstrained array indexed by enumeration type? > > And why would you want an empty array if the array type is constrained? > > > I do that all the time, especially in ASIS programming. You may have > arrays indexed with subranges of declaration_kinds for example. Really? I can see why you might have: type Declaration_Kind is (This, That, Mumble, Dumble); subtype My_Kind is Declaration_Kind range This..That; subtype Your_Kind is Declaration_Kind range Mumble..Dumble; type A1 is array(My_Kind) of Blah; type A2 is array(Your_Kind) of Glorp; But do you really do this: type A is array(Declaration_Kind range <>) of Something; subtype A1 is A(My_Kind); subtype A2 is A(Your_Kind); "all the time"? Nothing wrong with it; I just think the former case would be by far more common. And do you create *empty* arrays indexed by enums? All the time? ;-) My empty arrays are usually indexed by signed integer types. - Bob