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: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.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 08:45:03 +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> 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 1220506391 4650 141.54.178.228 (4 Sep 2008 05:33:11 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Thu, 4 Sep 2008 05:33:11 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: Xref: g2news2.google.com comp.lang.ada:7633 Date: 2008-09-04T08:45:03+02:00 List-Id: > > True. But, at the logic level, the Ada-statement > > What is the "logic level"? > > I you mean "abstract Boolean logic, like in college", then there is no > such thing as Constraint_Error, nor side effects. So of course it > gives you a bad understanding of programming languages. Actually, there is Constraint_Erorr, though under a different name. ;-) If your Boolean function is allowed to raise an exception, this is the same as returning "undefined" in three-valued logic, as I pointed out in another posting in this mail. This is the point I had been trying to make in all my postings to this thread: "False and Undefined" is False, not Undefined! 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. Perhaps that is the reason why people at AdaCore always write "and then" instead of "and". -- ------ Stefan Lucks -- Bauhaus-University Weimar -- Germany ------ Stefan dot Lucks at uni minus weimar dot de ------ I love the taste of Cryptanalysis in the morning! ------