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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc1b2,206c0414fb5fe3e X-Google-Attributes: gidfc1b2,public X-Google-Thread: 108abf,206c0414fb5fe3e X-Google-Attributes: gid108abf,public X-Google-Thread: 103376,21674edb667218cb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-09 15:20:43 PST Path: archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: sbdpumbaa@aol.com (bendel boy) Newsgroups: rec.aviation.military,rec.aviation.military.naval,comp.lang.ada Subject: Re: Ada (was Rival JSF teams fly final STOVL flights with flair, highlight strengths) Date: 9 Aug 2001 15:20:42 -0700 Organization: http://groups.google.com/ Message-ID: <4db10a80.0108091420.7ea3c2e9@posting.google.com> References: <945d79ff.0107312306.4665e855@posting.google.com> <3b67fd90_2@binarykiller.newsgroups.com> <421a7.235$0e7.91390140@newssvr16.news.prodigy.com> <3B6A1179.26C1C04@home.com> <3B6A15C3.8B3A9277@home.com> <3B6F73F9.15E98173@gte.net> <3b716b22_1@news.iglou.com> NNTP-Posting-Host: 152.163.213.202 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 997395642 26555 127.0.0.1 (9 Aug 2001 22:20:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 9 Aug 2001 22:20:42 GMT Xref: archiver1.google.com rec.aviation.military:47407 rec.aviation.military.naval:11630 comp.lang.ada:11713 Date: 2001-08-09T22:20:42+00:00 List-Id: "John Keeney" wrote in message news:<3b716b22_1@news.iglou.com>... > Matthew V. Jessick wrote in message > news:3B6F73F9.15E98173@gte.net... > > The if (A=B) { mistake where B is copied into A and if non-zero > > the if condition is true. > > Actually, I've writen this code more than a few times, and meant it. > Generally more in context of loops though. But why would you want to mean this? For my money, I would prefer the Algol approach: if (0 = A := B) then which would be interpreted as (i) assign B to A -- assignment clause (ii) test if A is zero -- logical clause The C code makes use of a confusing short-cut, allowing confusion between assignment, numbers, and booleans. Great for the experienced programmer - fatal for the follow-on maintenance.