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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-03 19:17:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: A case where Ada defaults to unsafe? Date: 3 Jan 2002 21:17:49 -0600 Organization: LJK Software Message-ID: <4L50vaZSJixT@eisner.encompasserve.org> References: <3C34BF2C.6030500@mail.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1010114271 13476 192.135.80.34 (4 Jan 2002 03:17:51 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Fri, 4 Jan 2002 03:17:51 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:18504 Date: 2002-01-03T21:17:49-06:00 List-Id: In article <3C34BF2C.6030500@mail.com>, Hyman Rosen writes: > So in Ada, one could say 'if a /= 0 and b/a > 3' and fall into a > trap that would not happen in C/C++. Since you did not propose: if b/a > 3 and a /= 0 I gather you are talking about the case where the programmer really intended that the a /= 0 test should happen first. If the programmer really wanted to specify the order, "and then" should be used. If the programmer insists on writing a program that differs from what they mean, they might as well write: if a /= 0 OR b/a > 3 Even though I have used other programming languages in the past, I have found the concept of "and then" quite easy to understand, though I have the advantage that my natural language is English.