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,602b7f606b0d64e2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-17 01:22:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!53ab2750!not-for-mail From: "AG" Newsgroups: comp.lang.ada References: Subject: Re: Private discrete type as index 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: Fri, 17 Jan 2003 22:24:34 -0800 NNTP-Posting-Host: 219.88.61.124 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1042795375 219.88.61.124 (Fri, 17 Jan 2003 22:22:55 NZDT) NNTP-Posting-Date: Fri, 17 Jan 2003 22:22:55 NZDT Organization: Xtra Xref: archiver1.google.com comp.lang.ada:33119 Date: 2003-01-17T22:24:34-08:00 List-Id: "Dmitry A. Kazakov" wrote in message news:b0435c$la5bg$1@ID-77047.news.dfncis.de... > tmoran@acm.org wrote: > > >> type x is limited private; > >> type test is array(x) of boolean; > > The "array" abstraction has certain characteristics, among them > > sequential indexing. > > Why so? Array is just a mapping index->element, so if no index ranges > required then the array index need not to be ordered (have "<" and "="), > only "=" is required. I suppose the answer will be that index ranges *are* required by the array semantics (in Ada, at least). But, as you pointed out: > Anyway a limited type is allowed to have both. So, it should be able to meet the range requirements too. At least if the provider of the type also provides the minimum set of operations.