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,b61052ba3fdc8c26 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-31 13:45:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!newsfeed.mathworks.com!cyclone.swbell.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3BE07058.A45058D3@Raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Integers and Mathematical Correctness References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 31 Oct 2001 15:42:48 -0600 NNTP-Posting-Host: 192.27.48.44 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1004564599 192.27.48.44 (Wed, 31 Oct 2001 15:43:19 CST) NNTP-Posting-Date: Wed, 31 Oct 2001 15:43:19 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:15511 Date: 2001-10-31T15:42:48-06:00 List-Id: "chris.danx" wrote: > [snip] > The problem is this... > > type c_integer is new integer; > > function "/" (a, b : c_integer) return c_integer is > begin > return standard."/" (a, b); -- simple test of override > end "/"; > > The line > standard."/" (a, b) doesn't work! I check the RM and the "/" for > integers is defined in standard, but it's not accepting it (this is just a > simple stub, it doesn't implement division properly for negatives yet!!! > The div is correct for non-negatives though). How about the following. I found w/ GNAT on Linux that... Z := "/"(X, Y); where Z, X, and Y are all of the type C_Integer works just fine - if you want that syntax. Why the use of Standard."/" does not work I will leave to other language lawyers. --Mark