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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!storethat.news.telefonica.de!telefonica.de!news-fra1.dfn.de!news-lei1.dfn.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: and then... (a curiosity) Date: Thu, 4 Sep 2008 14:12:57 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> <48bf90bf$0$30032$dbd4d001@news.euronet.nl> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: tigger.scc.uni-weimar.de 1220526065 23891 141.54.178.228 (4 Sep 2008 11:01:05 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Thu, 4 Sep 2008 11:01:05 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: <48bf90bf$0$30032$dbd4d001@news.euronet.nl> Xref: g2news1.google.com comp.lang.ada:1911 Date: 2008-09-04T14:12:57+02:00 List-Id: > > Thus, "if X/=0 and Y/X<100" should go into the else-branch, instead of > > raising an exception. > > The shortcut version "if X/=0 and then Y/X<100" does exactly the right > > thing. > > That would be a very bad idea. With that in place, an exception raised by a > simple programming error, /any/ programming error, would give control to the > else-branch. You misread what I wrote. A statement such as "if Y/X<000" should definitively propagate an exception for X=0, and I never said anything otherwise. But when "if X/=0 and Y/X<100" propagates an exception for X=0, as, alas, done in Ada, something is logically wrong. BTW, why do you think that an exception, such as a Constraint_Error, should logically count as a contradiction? Dividing something by zero is undefined, not a contradiction. -- ------ Stefan Lucks -- Bauhaus-University Weimar -- Germany ------ Stefan dot Lucks at uni minus weimar dot de ------ I love the taste of Cryptanalysis in the morning! ------