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,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-30 03:10:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!tdsnet-transit!newspeer.tds.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) Date: 30 May 2003 05:09:58 -0500 Organization: Berbee Information Networks Corporation Message-ID: References: <3ec4b1c9$1@news.wineasy.se> <9fa75d42.0305161748.1735fc32@posting.google.com> <4W%xa.28765$cK5.11964@nwrdny02.gnilink.net> <1053353256.804734@master.nyc.kbcfp.com> In article , Mark Lorenzen writes: > The idea of a saturated math type is elegant, but don't you want a > mechanism for checking if a variable has saturated (fx. for logging > purposes)? Something like: > > X := X + 5; > > if X'Saturated then > -- report unexpected saturation > end if; > > Use_Value(X); > > -- and so on > > The attribute 'Saturated would apply to a variable X of a saturated > type and return true if and only if the last value assignment to X had > to be adjusted to fit the range of X. What if the _penultimate_ assignment saturated, and the assignment after that was: X := X + 0;