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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!SEI.CMU.EDU!Marc.Graham From: Marc.Graham@SEI.CMU.EDU Newsgroups: comp.lang.ada Subject: Fixed times Integer Message-ID: <9008291554.AA01285@bx.sei.cmu.edu> Date: 29 Aug 90 15:54:45 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: Section 4.5.5 allows multiplication of an object of any fixed point type by an object of "the predefined type INTEGER" (Standard.Integer). Consider the following: ------------ procedure junk is type blarb is delta 0.1 range 0.0 .. 32769.0; thing : blarb; begin if thing * 32767 > thing * 32768 then null; end if; end junk; ---------- My Sun Alsys compliers complains in the following way: ------ 8 if thing * 32767 > thing * 32768 then <-1-> 1 *EXP This value is outside the range of the target type. NUMERIC_ERROR will be raised here at run time. ---- This complier will do 32-bit arithmetic, but Integer is 16 bits. Questions: 1) Is the Alsys complier correct in its complaint? (I think it is.) 2) Is there an Ada commentary or such to the effect: "Of course, when the manual *says* INTEGER it doesn't really *mean* INTEGER, ...."?