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-Thread: 103376,c80e6f742e73478f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ensuring postconditions in the face of exceptions Date: Fri, 12 Mar 2010 21:15:46 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <820d96c0-5d67-4b8c-8c5b-811ca4f1127e@g26g2000yqn.googlegroups.com> <4b9a098b$0$2339$4f793bc4@news.tdc.fi> <3696058c-235f-4d58-87be-74172ca0248a@g4g2000yqa.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1268450152 23883 69.95.181.76 (13 Mar 2010 03:15:52 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 13 Mar 2010 03:15:52 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:10523 Date: 2010-03-12T21:15:46-06:00 List-Id: "Jeffrey R. Carter" wrote in message news:hndhls$3ns$1@tornado.tornevall.net... > Ludovic Brenta wrote: >> >> Heh. I was kind of hoping you wouldn't say that :) I should have been >> more specific; I think using an access type is ugly but I can't think >> of a better solution. > > Use a limited type: > > type Dirty_Info is limited record > Value : Boolean := False; > end record; > > procedure Refresh (Object : in out T; Dirty : in out Dirty_Info); > ... > if Dirty.Value then > ... > Dirty.Value := True; > > Parameters of limited types are passed by reference. For the record, I think you mean "limited record types". There are no requirements on how limited private types or record types that happen to be limited because of a limited component are passed. Randy.