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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c1b98fe2a8046ba0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.91.199 with SMTP id cg7mr804523wib.1.1354630865775; Tue, 04 Dec 2012 06:21:05 -0800 (PST) MIME-Version: 1.0 Path: i11ni15447wiw.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: ada and gnat (mingw) Date: Tue, 4 Dec 2012 14:21:05 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <05172689-1761-45d4-9699-c829f6e63c93@r14g2000vbd.googlegroups.com> Injection-Date: Tue, 4 Dec 2012 14:21:05 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="e298f3c034f630fa7d024371528fc2e1"; logging-data="15855"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ygl9Kd4E+KFVxyMYthdinI4pplYStppM=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:HKFHbG19j0cRy4t6kANGKMWUur4= Date: 2012-12-04T14:21:05+00:00 List-Id: On 2012-12-04, Hans Vlems wrote: > This is not a real ADA language question and thus possibly off topic > but don't be too hard on a newbie :) > I want to use my own packages. Example: > > package my_constants is > > cc_hyphen : constant character := '-'; > cc_comma : constant character := ','; > cc_digit9 : constant character := '9'; > > end my_constants; > > This file is stored as my_constants.adb (on a WIndows platform). > gnatmake my_constants.adb results in: > gnatmake: my_constants.adb:1:08: keyword "body" expected here [see > file name] > > Inserting the reserverd word body after package on line 1 doesn't > help... > What am I doing wrong and where can I find information on how to drive > this compiler? > Hans > > PS > Apologies for the OT post Not OT, IMHO. With GNAT, the package specification goes into a .ads file; the package body goes into a .adb file. (This assumes you really are defining a specification above. :-)) Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world