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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Passing a String to a C/C++ Subprogram (Special Case) Date: Fri, 18 Oct 2013 21:11:44 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1374ac32-0fb5-4589-a9a5-7740030fd3c6@googlegroups.com> <4bb47482-ccb9-4641-a702-2b2978100ff9@googlegroups.com> <5b59543c-7c48-4427-afc6-30289f6d8895@googlegroups.com> <54aa8ad2-cd98-4f3e-bef9-494ddaefe4e9@googlegroups.com> <50cd020a-480f-4569-990b-b2861f628bc1@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1382148705 27826 69.95.181.76 (19 Oct 2013 02:11:45 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 19 Oct 2013 02:11:45 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2687 Xref: number.nntp.dca.giganews.com comp.lang.ada:183662 Date: 2013-10-18T21:11:44-05:00 List-Id: "Martin" wrote in message news:50cd020a-480f-4569-990b-b2861f628bc1@googlegroups.com... On Wednesday, October 16, 2013 6:42:29 PM UTC+1, Eryndlia Mavourneen wrote: ... >> In the Ada95 LRM (I have to use Ada95.), in the introduction to Annex B >> (B 2/3) it states: "Support for interfacing to any foreign language is >> optional." >> >That looks like Ada2012 RM rather than Ada95 (or Ada2005) >[http://www.ada-auth.org/standards/12rm/html/RM-B.html]. > >But I do like the Ada2012 wording...it seems clearer - either the compiler >has to indicate the lack of support; or exception has to be raised. If >neither of those occur then your code should work as expected. This is one of the things that falls under the so-called "Dewar rule": the Ada Standard never says nonsense (even when it literally does :-). No one ever thought that all programming languages have to be supported for interfacing, or that it is acceptable to accept the pragmas without actually implementing them. Unfortunately, the RM never actually said that. We figured it was better that it says so explicitly, thus we added some wording in Ada 2012. (My recollection is that we attempted to do so for Ada 2005, but put the wording in the wrong place so it didn't appear to apply where it should have.) Randy.