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,dd182ceb611c674a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-29 11:13:50 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Limited Type Access Date: Mon, 29 Oct 2001 14:16:59 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:15370 Date: 2001-10-29T14:16:59-05:00 List-Id: wrote in message news:mailman.1004379225.31568.comp.lang.ada@ada.eu.org... > Greeting, > > I could not figure out why the codes below compiled without any error. My > thought was that access type of a limited type is considered limited. You may be confusing access types with array (really, "composite") types. An array type whose component type is limited is itself limited. An access type is always nonlimited, irrespective of the limitedness of the designated type. > Therefore, > Object type must be limited because its component is limited. What did I miss? A record type containing a limited component is itself limited -- just like for arrays. A record type containing with only nonlimited components is nonlimited. However, in either case you are of course free to explicitly declare a record type as limited: type Object is limited record Sem : Binary_Access; end record; One of Bob Duff's ideas was to be able to declare array types as limited, like this: type Limited_Array is limited array (Positive range <>) of Integer; --not legal Ada syntax