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-Thread: a07f3367d7,5edee74b13d8e50a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!news2.arglkargh.de!news.n-ix.net!news.belwue.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: michael bode Newsgroups: comp.lang.ada Subject: Re: The "black magic" of ioctl Date: Sat, 23 Oct 2010 15:27:38 +0200 Organization: Evangelisches Atomkraftwerk =?ISO-8859-1?Q?M=FClheim-K=E4rl?= =?ISO-8859-1?Q?ich?= Message-ID: References: <74b46743-fb81-48cc-a478-ffd069db2fc6@k22g2000yqh.googlegroups.com> NNTP-Posting-Host: p5b24a923.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: online.de 1287840462 1511 91.36.169.35 (23 Oct 2010 13:27:42 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sat, 23 Oct 2010 13:27:42 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101006 Thunderbird/3.1.5 In-Reply-To: Xref: g2news1.google.com comp.lang.ada:14694 Date: 2010-10-23T15:27:38+02:00 List-Id: Am 23.10.2010 14:13, schrieb Simon Wright: > michael bode writes: > >> if 0 = Ioctl (Device.Fd, VIDIOC_QUERYCAP, C_Cap'access) then > > I recognise the point of this to-me totally counter-intuitive convention > in C, really not needed in Ada! (or Python ..) You mean functions returning error codes? Or putting 0 on the left side of the equality operator? Calling C functions from Ada is writing C in Ada syntax. Therefore you hide it in a package that looks like Ada to the outside.