comp.lang.ada
 help / color / mirror / Atom feed
From: emery@goldfinger.mitre.org (David Emery)
Subject: Re: private types and recompilation
Date: 28 Jan 93 14:13:29 GMT	[thread overview]
Message-ID: <EMERY.93Jan28091329@goldfinger.mitre.org> (raw)

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

             reply	other threads:[~1993-01-28 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-01-28 14:13 David Emery [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-01-28 23:44 private types and recompilation Alex Blakemore
1993-01-28 18:08 Mark A Biggar
1993-01-28 15:58 Pat Rogers
1993-01-28 15:25 Tucker Taft
1993-01-28  8:07 Christian S. Collberg
1993-01-28  1:22 Kenneth Anderson
1993-01-27 22:15 David Erickson
replies disabled

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