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-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Tue, 16 Jan 2007 16:32:45 -0600 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45ace573$1_3@news.bluewin.ch> <68qioe.mes.ln@hunter.axlog.fr> <1168963927.396654.169380@s34g2000cwa.googlegroups.com> <1168967445.2218.119.camel@localhost> Date: Tue, 16 Jan 2007 23:32:41 +0100 Message-ID: <874pqqd2ly.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:GsWFTIaqVkZvATDKqXmxygVlpyk= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 62.235.245.201 X-Trace: sv3-Kszr6+ze0tSWgWJdGP1JZrIJtWT6Axvl/UzNxP5th8zRDRVayDDi5eF2sE8ZAlFyL+q6qEoBpwBKqXP!k1O20FQyxZoU6fpbTRYCmCqaSM6tUN4Xe50iEVyrj4dhg7JMz6V1G+/WgczGm9u+qu/yY13QNt0= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:8202 Date: 2007-01-16T23:32:41+01:00 List-Id: Georg Bauhaus writes: >On Tue, 2007-01-16 at 08:12 -0800, Ludovic Brenta wrote: [...] >> if (a = 1, b = a, c = --a, (a = --b) == c) { >> ... >> } >> >> Ah, the joy of obfuscated programming :) :) :) >> Obfuscuation in this style is quite possible in Ada, too, > > including side effects. This is from a legal program: > > if (a = 1, b = a) = T' (c = -a, (a = -b) =- c) then > null; > end if; > > Hint: the parentheses are needed :) Including the side effects? All I see are two aggregates for a hypothetical "type T is array (Positive range <>) of Boolean", but where are the assignments to a, b and c? And where are the decrements of a and b? -- Ludovic Brenta.