comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
Subject: Re: ada and gnat (mingw)
Date: Tue, 4 Dec 2012 14:21:05 +0000 (UTC)
Date: 2012-12-04T14:21:05+00:00	[thread overview]
Message-ID: <k9l0sh$fff$1@dont-email.me> (raw)
In-Reply-To: 05172689-1761-45d4-9699-c829f6e63c93@r14g2000vbd.googlegroups.com

On 2012-12-04, Hans Vlems <hvlems@freenet.de> 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



  reply	other threads:[~2012-12-04 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 14:06 ada and gnat (mingw) Hans Vlems
2012-12-04 14:21 ` Simon Clubley [this message]
2012-12-04 15:17   ` Hans Vlems
2012-12-04 16:49     ` Georg Bauhaus
2012-12-04 17:37       ` Simon Clubley
2012-12-04 20:29     ` Anh Vo
2012-12-04 14:21 ` Dmitry A. Kazakov
2012-12-04 14:26 ` Vinzent Höfler
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox