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!news1.google.com!news2.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: <_pwre.7121$U4.1023104@news.xtra.co.nz> Date: Tue, 14 Jun 2005 20:21:26 +1200 NNTP-Posting-Host: 219.88.154.112 X-Complaints-To: abuse@xtra.co.nz X-Trace: news.xtra.co.nz 1118737146 219.88.154.112 (Tue, 14 Jun 2005 20:19:06 NZST) NNTP-Posting-Date: Tue, 14 Jun 2005 20:19:06 NZST Organization: Xtra Xref: g2news1.google.com comp.lang.ada:11336 Date: 2005-06-14T20:21:26+12:00 List-Id: "Robert A Duff" wrote in message news:wccfyvm78k0.fsf@shell01.TheWorld.com... > Now I have a variable Gizmos, and I want to print out the > numbers of Gizmos per Widget (when that's meaningful). > In *portable* code, I might want to write: > > if Widgets = 0 then > Put_Line("Unknown"); > else > Put_Line(Image(Gizmos/Widgets)); > end if; > > If divide by zero were illegal at compile time, even in unreachable > code, the above would be annoying illegal on Unix. Interesting example. I guess I'm taking it a bit on a tangent now but how does that square off with RM 11.6.5 which says in part: ... The exception need be raised by the implementation only if, in the absence of raising it, the value of this undefined result would have some effect on the external interactions of the program ... Yes, I know it's just an implementation permission and so doesn't define the language. Yet, the idea seems to be that if there is no possible observable effect then it's ok. Shouldn't the same logic apply in your example as well?