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!news3.google.com!newshub.sdsu.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Surprise in array concatenation Date: Tue, 06 Sep 2005 11:03:59 +0200 Organization: Adalog Message-ID: <02mjfd.p5u.ln@hunter.axlog.fr> References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <14muavojz308w.1ouv7xin79rqu$.dlg@40tude.net> <87fyspgqrm.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1126000874 16539 195.25.228.57 (6 Sep 2005 10:01:14 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 6 Sep 2005 10:01:14 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:4469 Date: 2005-09-06T11:03:59+02:00 List-Id: Robert A Duff a �crit : > Jean-Pierre Rosen writes: > > >>Robert A Duff a �crit : > 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); Not that often, but it may happen. Especially if you have services like: procedure do_something (On : A); and want to be able to call it on A1 or A2. > "all the time"? Nothing wrong with it; I just think the former case > would be by far more common. More common, yes. But the other do happen. > And do you create *empty* arrays indexed by enums? All the time? ;-) Might happen as default values for the above do_something procedure. Not common, but not impossible. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr