comp.lang.ada
 help / color / mirror / Atom feed
From: sparre@cats.nbi.dk
Subject: Re: Child package: private type and IO
Date: 1998/02/17
Date: 1998-02-17T00:00:00+00:00	[thread overview]
Message-ID: <6cbuat$cg3$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 6c2r0l$iic$1@madmax.keyway.net


John <johnjohn@triceratops.com> wrote:

> I'm trying to write two separate packages, one for a private
> type and constructor, and the other an IO package.  House
> rules. :(

Good rules!

I would have been nice if you posted more code (and told us that you are using
GNAT :-).

GNAT has some rather strict rules for the names of source files. If you are in
doubt about them, run "gnatchop" on your individual source files, and see how
it splits the source up and names the files.

A parent-client package example:

   --  file: parent.ads

   package Parent is

      type Object is ...;

      function Initialise return Object;

   end Parent;

   --  file: parent-child.ads

   with Ada.Text_IO;

   package Parent.Child is

      procedure Put (File : in     Ada.Text_IO.File_Type;
                     Item : in     Object);

      procedure Get (File : in     Ada.Text_IO.File_Type;
                     Item :    out Object);

   end Parent.Child;

You will of cause also need implementations (package bodies) for these
specifications.

Jacob Sparre Andersen

-- Have you played with your LEGO today?

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading




  parent reply	other threads:[~1998-02-17  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-14  0:00 Child package: private type and IO johnjohn
1998-02-16  0:00 ` Tom Moran
1998-02-17  0:00 ` sparre [this message]
1998-02-27  0:00   ` Matthew Heaney
1998-03-01  0:00     ` type names (was Re: Child package: private type and IO) Ray Blaak
1998-03-01  0:00       ` Matthew Heaney
1998-03-01  0:00         ` Brian Rogoff
1998-03-01  0:00           ` Matthew Heaney
1998-03-03  0:00             ` Ray Blaak
1998-03-04  0:00         ` Fergus Henderson
1998-03-03  0:00           ` Brian Rogoff
1998-03-04  0:00             ` John G. Volan
1998-03-05  0:00               ` Case sensitivity [was Re: type names (was Re: Child package: private type and IO)] Anonymous
1998-03-05  0:00                 ` John G. Volan
replies disabled

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