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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,56e5e06428166864 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!y35g2000prc.googlegroups.com!not-for-mail From: Edward Fish Newsgroups: comp.lang.ada Subject: Re: problems with interfacing c Date: Mon, 31 Jan 2011 15:06:18 -0800 (PST) Organization: http://groups.google.com Message-ID: <53eb7180-733e-4fcd-955f-a31a26b53389@y35g2000prc.googlegroups.com> References: <8b6a5b24-5ab0-4d38-9be8-86911aba7fcf@k22g2000yqh.googlegroups.com> <13d5wy5ni51xh$.xnhoi3uhm9ql.dlg@40tude.net> <85c958cc-8cd3-46be-b14d-3519ff207d87@b8g2000vbi.googlegroups.com> <1dfd4mpvmtkt2.aqwiaoz63qli$.dlg@40tude.net> NNTP-Posting-Host: 174.28.151.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1296515178 32068 127.0.0.1 (31 Jan 2011 23:06:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 31 Jan 2011 23:06:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y35g2000prc.googlegroups.com; posting-host=174.28.151.164; posting-account=IGEw6QoAAAChe8btAoGmJk0kqF3q3VLA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:16819 Date: 2011-01-31T15:06:18-08:00 List-Id: On Jan 31, 2:46=A0pm, Stoik wrote: > > I am especially grateful for the help with interfacing c (even if it > does not make much sense :)) because I would like to learn why things > do not work as expected. > Regards, > Stanislaw Goldstein Well, if you'll forgive the snarky comment: C/C++ rarely behave as expected. It's at such a point where there are many C-ism rules/tricks for ensuring better chances of a successful compile, one of which is to use "0=3D=3Dvar" instead of "var=3D=3D0" to mitigate the C-Syntax allowance= of assignments during condition-testing. Another is that the operator- shortcut's (like -=3D, +=3D, *=3D, /=3D) regularity fails when you reach logical-negation: !=3D is a condition test, not a shortcut for "x =3D !x."