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,2c4429dc5b1f1886 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn?= Persson Newsgroups: comp.lang.ada Subject: Re: Ada Leaking Into Day Job Followup-To: comp.lang.ada Date: Sun, 21 Mar 2010 01:21:42 +0100 Message-ID: <80l74nFptU1@mid.individual.net> References: <00bf1adf-0a87-42d4-ae72-f80dd125279a@g1g2000pre.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8Bit X-Trace: individual.net w2XDCPI2E53oLHcT/THYHwXMWU4ANmSbTn3zI1u4YmWHVqjY41 Cancel-Lock: sha1:fQKnVLMW+qMxcwH2loinc1sQ5T4= User-Agent: KNode/4.4 Xref: g2news2.google.com comp.lang.ada:10650 Date: 2010-03-21T01:21:42+01:00 List-Id: Adam Beneschan wrote: > if (code /= 0) { ... } > > This is valid C, so the compiler won't complain Are you sure? ;-) int main(int argc, char** argv) { int code = 1; if(code /= 0) { return 1; } return 0; } [beorn@hactar tester]$ LANG=en gcc ada_not_equal.c ada_not_equal.c: In function 'main': ada_not_equal.c:3: warning: division by zero That's even without the otherwise indispensable -Wall. The problem I have most often when I switch languages is that I get =, := and == mixed up. -- Bj�rn Persson PGP key A88682FD