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,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!s34g2000cwa.googlegroups.com!not-for-mail From: "Ludovic Brenta" Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm Date: 16 Jan 2007 08:12:09 -0800 Organization: http://groups.google.com Message-ID: <1168963927.396654.169380@s34g2000cwa.googlegroups.com> References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45ace573$1_3@news.bluewin.ch> <68qioe.mes.ln@hunter.axlog.fr> NNTP-Posting-Host: 212.190.145.10 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1168963940 22181 127.0.0.1 (16 Jan 2007 16:12:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 16 Jan 2007 16:12:20 +0000 (UTC) In-Reply-To: <68qioe.mes.ln@hunter.axlog.fr> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 SEVPXS01 Complaints-To: groups-abuse@google.com Injection-Info: s34g2000cwa.googlegroups.com; posting-host=212.190.145.10; posting-account=ZjNXewwAAADyBPkwI57_UcX8yKfXWOss Xref: g2news2.google.com comp.lang.ada:8181 Date: 2007-01-16T08:12:09-08:00 List-Id: Jean-Pierre Rosen a =E9crit : >> A question: I see all the time things like "if (.. < ..)" in C - are the >> parentheses required there ? > Yes, they are - because C has no "then" keyword. There must be something > to tell the compiler where the expression ends... Not to mention that the parentheses may contain several expressions separated by the comma operator, some or all of which may have side effects, and only the last of which actually controls the if statement... for example: if (a =3D 1, b =3D a, c =3D --a, (a =3D --b) =3D=3D c) { ... } Ah, the joy of obfuscated programming :) :) :) --=20 Ludovic Brenta.