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!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!53ab2750!not-for-mail From: "Lurker" Newsgroups: comp.lang.ada References: <79ahr0jozmqb$.10jzllrcjpmsv.dlg@40tude.net> Subject: Re: Division by zero X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: Date: Mon, 13 Jun 2005 20:47:39 +1200 NNTP-Posting-Host: 219.88.171.11 X-Complaints-To: abuse@xtra.co.nz X-Trace: news.xtra.co.nz 1118652324 219.88.171.11 (Mon, 13 Jun 2005 20:45:24 NZST) NNTP-Posting-Date: Mon, 13 Jun 2005 20:45:24 NZST Organization: Xtra Xref: g2news1.google.com comp.lang.ada:11308 Date: 2005-06-13T20:47:39+12:00 List-Id: "Jeffrey Carter" wrote in message news:JNZqe.3031$NX4.2109@newsread1.news.pas.earthlink.net... > The problem, it seems to me, is that the developer may deliberately > write a division of a variable by static zero for a number of reasons. > He may want it to raise Constraint_Error at run time, or may have > redefined "/" for the type of the variable to do something meaningful if > the divisor is zero. 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.