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,a1c2523f8c9a6b7d X-Google-Attributes: gid103376,public From: john@assen.demon.co.uk (John McCabe) Subject: Re: Ada equivalent of C "static" structures Date: 1997/03/09 Message-ID: <33233253.43078446@news.demon.co.uk>#1/1 X-Deja-AN: 224241068 X-NNTP-Posting-Host: assen.demon.co.uk References: <33206981.84E@mccabe.com> <332146fc.891048@news.demon.co.uk> Newsgroups: comp.lang.ada Date: 1997-03-09T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) wrote: >John suggests > ><object definition you require, and only "with" it in a single file >e.g: > >*file1* >package data_package is > type x is record > : > : > end record; > > x_value : x; >end data_package; > >*file2* >with data_package; >package body p_1 is > : > : >end p_1; > >>> > >Robert replies > >If data_package is only going to be with'ed from p_1, then make it a >private child of p_1, but far simpler, as suggested by several replies, >already, is just to define x_value within the body of p_1. I am not >sure why John is suggesting a separate package here, it seems entirely >unnecessary. > You're quite right. I missed out the "with" for p_2 i.e.: *file2* with data_package; package body p_1 is : : end p_1; with data_package; -- Originally missed this out! package body p_2 is : : end p_2; Best Regards John McCabe