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,449b3383afc55069 X-Google-Attributes: gid103376,public From: sparre@cats.nbi.dk Subject: Re: Child package: private type and IO Date: 1998/02/17 Message-ID: <6cbuat$cg3$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 325846307 References: <6c2r0l$iic$1@madmax.keyway.net> Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Feb 17 12:03:42 1998 GMT X-Http-User-Agent: Mozilla/3.04Gold (X11; I; OSF1 V3.2 alpha) via proxy gateway CERN-HTTPD/3.0 libwww/2.17 Newsgroups: comp.lang.ada X-Originating-IP-Addr: 130.225.212.55 Date: 1998-02-17T00:00:00+00:00 List-Id: John 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