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-Thread: 103376,e01fe1b326df26d4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050511 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Division by zero References: <79ahr0jozmqb$.10jzllrcjpmsv.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 14 Jun 2005 02:19:58 GMT NNTP-Posting-Host: 4.240.244.177 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1118715598 4.240.244.177 (Mon, 13 Jun 2005 19:19:58 PDT) NNTP-Posting-Date: Mon, 13 Jun 2005 19:19:58 PDT Xref: g2news1.google.com comp.lang.ada:11328 Date: 2005-06-14T02:19:58+00:00 List-Id: Lurker wrote: > Sorry, that doesn't qualify. In my case there was no redifinition > of "/" function. Compiler, of course, knows that since it has to > resolve the reference anyway. So it did know that the "/" in > question was your regular pre-defined division. Since it knows > that, then the only reason to allow that to pass would be for > intentional exception raising. But as someone else pointed > out you can just go ahead and use "raise exception" statement > if you really want that. Basically, it seems to me very hard to > think of a situation where that division would be a bona-fide, > intended thing. I suppose a compiler could tell if "/" had been redefined for a type, and produce warnings only in the case where it had not, but I don't know of any compilers that do. There are situations where exceptions are not allowed by local rules, and some people will always try to find ways around such rules, but in general I'd expect a raise statement in most cases. -- Jeff Carter "Blessed are they who convert their neighbors' oxen, for they shall inhibit their girth." Monty Python's Life of Brian 83