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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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 10:28:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: Limited Type Access Date: Mon, 29 Oct 2001 13:27:27 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 1004380135 56539 137.194.161.2 (29 Oct 2001 18:28:55 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 29 Oct 2001 18:28:55 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:15367 Date: 2001-10-29T13:27:27-05:00 There is no limited type declared below. You named your package Limited_Access, but that doesn't make anything limited. It's just a name in this case. You have to declare the type as limited. There was a feature in Ada 83 that carries over to Ada 95. You couldn't pass a limited type object around, but you could pass a pointer to the limited type object. Frank -----Original Message----- From: ANH_VO@udlp.com [mailto:ANH_VO@udlp.com] Sent: Monday, October 29, 2001 11:09 AM To: comp.lang.ada@ada.eu.org Subject: Limited Type Access 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. Therefore, Object type must be limited because its component is limited. What did I miss? Thanks for your help. Anh Vo package Limited_Access is protected type Counting ( Start_Count : Positive := 1) is entry Secure; procedure Release; private Current_Count : Natural := Start_Count; end Counting; subtype Binary is Counting (Start_Count => 1); type Binary_Access is access all Binary; type Object is record Sem : Binary_Access; end record; end Limited_Access; _______________________________________________ comp.lang.ada mailing list comp.lang.ada@ada.eu.org http://ada.eu.org/mailman/listinfo/comp.lang.ada