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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,604e0f87aa06eab6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-22 14:28:47 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!enews.sgi.com!news.xtra.co.nz!53ab2750!not-for-mail From: "AG" Newsgroups: comp.lang.ada References: <7eee7v4hpvj0i5s345uonlen5315rhiau8@4ax.com> <1ec946d1.0303201528.6c9b2c9e@posting.google.com> Subject: Re: Imitation is the sincerest form of flattery X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Sun, 23 Mar 2003 10:28:38 +1200 NNTP-Posting-Host: 219.88.61.247 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1048372122 219.88.61.247 (Sun, 23 Mar 2003 10:28:42 NZST) NNTP-Posting-Date: Sun, 23 Mar 2003 10:28:42 NZST Organization: Xtra Xref: archiver1.google.com comp.lang.ada:35627 Date: 2003-03-23T10:28:38+12:00 List-Id: "Vinzent Hoefler" wrote in message news:b5ilma$27ungi$1@ID-175126.news.dfncis.de... "AG" wrote: [arrays with index "holes"] >Do you mean implemented by hand as an application code or >supported by the language? If later, I would be interested in >a reference please. |type Enum is (One, Five, Six); |for Enum use (One => 1, Five => 5, Six => 6); | |type Lookup is array(Enum'Range) of ... Something like that? Well, no. Of course not. That's representation clauses. I believe there were some threads in this NG before about rep clauses for enums being next to useless but that's not the point in this case What I had in mind would be something like: [Somewhere in package spec:] type x is limited private; type y is array(x) of x; -- Of, course, need to provide operations on x here: "+" "-" 'range etc Implementing them may be trivial or not. But it's neither here nor there - can't do the first part of the declaration anyway.