home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!scifi!acheron!philabs!linus!linus.mitre.org!linus!mbunix!emery
- From: emery@goldfinger.mitre.org (David Emery)
- Subject: Re: private types and recompilation
- In-Reply-To: erickson@taurus.cs.nps.navy.mil's message of 27 Jan 93 22:15:35 GMT
- Message-ID: <EMERY.93Jan28091329@goldfinger.mitre.org>
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: goldfinger.mitre.org
- Organization: The Mitre Corp., Bedford, MA.
- References: <7277@grus.cs.nps.navy.mil>
- Date: Thu, 28 Jan 1993 14:13:29 GMT
- Lines: 33
-
- In this particular situation, Ada can do what you want. You can
- complete an incomplete type in the package body. So, given:
-
- private
- type LIST;
- type POSITION is access LIST;
- type LIST is record
- A: ATOM;
- NEXT: POSITION;
- end record;
- end LIST_ADT;
-
- you can do the following:
-
- private
- type LIST;
- type POSITION is access LIST;
- end LIST_ADT;
-
- package body LIST_ADT is
-
- type LIST is record
- A: ATOM;
- NEXT: POSITION;
- end record;
-
- ...
- end LIST_ADT;
-
- (Thanks to Tucker Taft who argued for this feature in Ada 83.)
-
- dave
-
-