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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7ea1cb7a2beb2ee X-Google-Attributes: gid103376,public From: dale Subject: Re: Disallowing Pre-Defined Operations Date: 2000/04/07 Message-ID: #1/1 X-Deja-AN: 607793477 References: <8a9eeg$qtv$1@newpoisson.nosc.mil> <38D2E598.262D1CD5@erols.com> <8b0pbg$aph$1@nnrp1.deja.com> <38D9A2E8.F720768@erols.com> <8bcalg$pmb$1@nnrp1.deja.com> <38EBDD10.65444727@earthlink.net> <38EC160F.E2A13F44@quadruscorp.com> <8cic1h$195$1@nnrp1.deja.com> <38ED3145.BE3CEC68@quadruscorp.com> X-Trace: 7 Apr 2000 12:43:20 GMT, dale.cs.rmit.edu.au Organization: rmit User-Agent: MT-NewsWatcher/3.0 (PPC) Newsgroups: comp.lang.ada Date: 2000-04-07T00:00:00+00:00 List-Id: Marin D. Condic" wrote: > It doesn't sound to me like something that would require some massive > compiler rewrite or some fundamental change in Ada syntax or semantics. > I'm no expert, but it seems fairly small and self-contained such that a > compiler could provide it as an option that could be toggled by > switches. Syntax? Maybe "type T is saturated digits 6 ;" or "type T is > saturated range -128..127 ;" Maybe as a pragma? "pragma Saturate (T) ;" > I personally wouldn't be fussy. :-) A pragma would not do it, as you would have to deal with generics. (e.g. the semantics of a multiply operation in a generic would have to be modified not to raise an exception, but to cap the result). Dale