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: 103376,e5cc1b2c83f144e8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.11.4 with SMTP id m4mr238568pbb.31.1316245576291; Sat, 17 Sep 2011 00:46:16 -0700 (PDT) Path: m9ni8077pbd.0!nntp.google.com!news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Georg Maubach Newsgroups: comp.lang.ada Subject: Re: Ada Packages Date: 17 Sep 2011 07:46:14 GMT Message-ID: <9dj1i6FlavU2@mid.individual.net> References: <9diqfnFu6kU1@mid.individual.net> <9divtrFlavU1@mid.individual.net> Mime-Version: 1.0 X-Trace: individual.net Pgq3p5OQTbkeULICjbEafQUz8D4RSGzOqWl9AudjIIjuhGX3ml Cancel-Lock: sha1:Nla1j2enIzUy/B1nINLw3ah97oE= User-Agent: Pan/0.132 (Waxed in Black) Xref: news1.google.com comp.lang.ada:18001 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2011-09-17T07:46:14+00:00 List-Id: Hi Jeffrey, Hi Jean-Pierre, I tried again and checked my code. The reason for the error is a wrong call to a function. It should read package Float_InOut is new Float_IO(Float); instead of package Float_InOut is new Integer_IO(Float); Many thanks for your willingness to help. Kind regards George Am Sat, 17 Sep 2011 07:18:20 +0000 schrieb Georg Maubach: > Hi Jeffrey, > Hi Jean-Pierre, > > you're right: I left my comments out. > > I started all over, deleted both files and build a new file with just > the three lines in it: > > package Basic_Num_IO is > procedure Num_IO; > end Basic_Num_IO; > > The compiler error is now > > gcc-4.3 -c basic_num_io.ads > cannot generate code for file basic_num_io.ads (package spec) to check > package spec for errors, use -gnatc gnatmake: "basic_num_io.ads" > compilation error > > I tried gcc-4.3 -c -gnatc basic_num_io.ads. No error occured. > > How can I fix that? > > Kind regards > > George > > Am Sat, 17 Sep 2011 05:45:27 +0000 schrieb George: > >> Hi All, >> >> I tried to build a basic package. My two files look like this: >> >> File 1: basic_num_io.ads >> >> package Basic_Num_IO is >> procedure Num_IO; >> end Basic_Num_IO; >> >> File 2: basic_num_io.adb >> >> with text_io; use text_io; >> >> package body Basic_Num_IO is >> procedure Num_IO is >> package Integer_InOut is new Integer_IO(integer); package >> Float_InOut is new Integer_IO(float); begin >> null; >> end Num_IO; >> end Basic_Num_IO; >> >> If I call gnat compile basic_num_io.ads I get the error message: >> >> basic_num_io.ads:8:01: end of file expected, file can have only one >> compilation unit >> >> What am I doing wrong? Where can I find it in the documentation? >> >> Kind regards >> >> George