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!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Tue, 14 Jun 2005 15:19:58 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <79ahr0jozmqb$.10jzllrcjpmsv.dlg@40tude.net> <_pwre.7121$U4.1023104@news.xtra.co.nz> Subject: Re: Division by zero Date: Tue, 14 Jun 2005 15:22:27 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-5gK7bJ3mB3jqcCXCV2n7xQ6qBNWYYQRsa1HdiEL4rsnuLIUdX83iZ4mfGx/zqLJa+csrrtkukTAmS3B!3UKbnR/r/ZZ0Hh9V6Z1BDRGTBB6BAnL3ZKemMDMAYKm7yiWjrr3MsxaLDuse7DmLsQG6c55N2I+i X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:11358 Date: 2005-06-14T15:22:27-05:00 List-Id: "Lurker" wrote in message news:_pwre.7121$U4.1023104@news.xtra.co.nz... > "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? No, because 11.6 doesn't apply to Legality Rules, only runtime effects. If the program is illegal, it can hardly have a runtime effect, and certainly it is not raising any exceptions. Randy.