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,ec21c3c7cdc7ff3e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <4415DE98.6060209@obry.net> Date: Mon, 13 Mar 2006 22:05:28 +0100 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada To: Mark Lorenzen Subject: Re: private types References: <1142279908.327131.230200@j52g2000cwj.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Date: 13 Mar 2006 22:05:29 CET NNTP-Posting-Host: 82.120.19.101 X-Trace: 1142283929 news.wanadoo.fr 18306 82.120.19.101:2619 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:3346 Date: 2006-03-13T22:05:29+01:00 List-Id: Mark Lorenzen a �crit : > I think that I understand what you are trying to do... You want to > prevent the user of your package from declaring uninitialised > variables of type PrivateType.MyInteger, right? In this case I would > declare the partial view of the type (the non-private part) to be > indefinite: > > type MyInteger (<>) is private; Or: private type T is range 1 .. 2**31 - 1; type MyInteger is record Value : T := 0; end record; This depends on the "real" program. Hard to tell if this is not overkill for the simple code snippet posted :) Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595