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 04:50:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Marin David Condic 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: Fri, 30 May 2003 07:50:28 -0400 Organization: MindSpring Enterprises Message-ID: <3ED74584.1050007@noplace.com> 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> <3ECFF541.1010705@attbi.com> <3ED0B820.5050603@noplace.com> NNTP-Posting-Host: d1.56.b0.26 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Server-Date: 30 May 2003 11:50:31 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:38081 Date: 2003-05-30T11:50:31+00:00 List-Id: No, I don't think so. I've got regular old integers and floats and fixed points that can generate an exception and let me stop and write out a report. The usage I would have for it is the case where I want to compute a position or rate and if it exceeds some limit, just chop it off and press onwards. (Often computation speed in this domain is critical) We usually do this manually with if-checks around the results of a computation. It just doesn't protect you in the event of an overflow that would generate an exception. The exception is "bad" because your typical response is to reboot the control and start over - and we all know what a bad thing that can be from the Ariane 5 disaster. :-) MDC Mark Lorenzen wrote: > > 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. > > - Mark -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "In general the art of government consists in taking as much money as possible from one class of citizens to give to the other." -- Voltaire ======================================================================