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!feeder.news-service.com!newsfeed.straub-nv.de!news2.arglkargh.de!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ensuring postconditions in the face of exceptions Date: Fri, 12 Mar 2010 07:00:19 -0700 Organization: TornevallNET - http://news.tornevall.net 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: 2047e757b51cc3ee35cb6cb2447e5d9a Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 4a7b3021266a68436a9dc34ceea94c5f X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <3696058c-235f-4d58-87be-74172ca0248a@g4g2000yqa.googlegroups.com> X-Validate-Post: http://news.tornevall.net/validate.php?trace=4a7b3021266a68436a9dc34ceea94c5f X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.23 (X11/20090817) X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:10517 Date: 2010-03-12T07:00:19-07:00 List-Id: 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. -- Jeff Carter "What I wouldn't give for a large sock with horse manure in it." Annie Hall 42