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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fe441248ffa1c543 X-Google-Attributes: gid103376,public From: root Subject: Re: What's wrong with this? Date: 1997/05/19 Message-ID: #1/1 X-Deja-AN: 242396993 References: Organization: NASA/MSFC Newsgroups: comp.lang.ada Date: 1997-05-19T00:00:00+00:00 List-Id: On 16 May 1997, Robert Dewar wrote: > Anders says > > < > 'pragma "Export" requires separate spec and must come before body'. > > The example is directly out of the GNAT Documents INTRO Rev 1.98, from > the section 'Building a Program where the Main Program is not in Ada'. I > have now seen various examples with 'pragma Export' used this way, the > implication is that this should work.>> > > > Nope, the example is wrong (and does not appear in the current GNAT > documentation). Ok, the example is incorrect, no problem, however, I just ( as in 10 minutes ago ) downloaded the following: gnat-3.09-i486-linux-elf-bin.tar.gz from cs.nyu.edu, and I'm looking at the gnatinfo.txt file ( GNAT DOCUMENTS INTRO $Revision 1.104$ ) included in this distribution. In the section 'Building a Program where the Main Program is not in Ada' there is the following example: Main program (m.c) main() { adainit(); Header(); adafinal(); } Ada subroutine (header.adb) with Text_IO; use Text_IO; procedure Header is begin put_line ("Header"); end; pragma Export (C, Header, "Header"); Compile the units gcc -c m.c gcc -c header.adb Bind gnatbind -n header.ali Link gnatlink header.ali m.o Run header As I understand the situation, gnat 3.09 is the latest release. I guess what I would like to know is, what is the latest documentation I'm supposed to be looking at. Also, if this example is incorrect, why is it included in two releases of gnat ( 3.07 & 3.09 )? This is confusing to the newcomer :). AE address e-mail replies to: eliasson@logan.msfc.nasa.gov