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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,602b7f606b0d64e2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-12 11:48:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn14feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!sccrnsc04.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Private discrete type as index References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc04 1042400879 12.234.13.56 (Sun, 12 Jan 2003 19:47:59 GMT) NNTP-Posting-Date: Sun, 12 Jan 2003 19:47:59 GMT Organization: AT&T Broadband Date: Sun, 12 Jan 2003 19:48:00 GMT Xref: archiver1.google.com comp.lang.ada:32943 Date: 2003-01-12T19:48:00+00:00 List-Id: > type x is limited private; > type test is array(x) of boolean; The "array" abstraction has certain characteristics, among them sequential indexing. The object being implemented here is not an array. If read-only, perhaps it's a function. For read/write, perhaps a function returning a pointer would be the syntactically simplest approach. test_object(x).all := not test_object(y).all; To allow multiple objects, of course, will require an additional parameter, hidden or not, to distinguish which one.