comp.lang.ada
 help / color / mirror / Atom feed
From: Wojtek Narczynski <wojtek@power.com.pl>
Subject: Ada0Y limited with
Date: Fri, 01 Oct 2004 00:23:46 +0200
Date: 2004-10-01T00:23:46+02:00	[thread overview]
Message-ID: <pan.2004.09.30.22.23.45.962614@power.com.pl> (raw)

Hello,

(GNAT in gcc mainline refuses compile the example from the "An invitation
to Ada 2005" presentation, claiming "circular unit dependency" error, so
I have serious problems trying to understand how this is supposed to work.)

Do I need to declare an access type every time I want to use a a type from
the limited-withed package, or can I just use the access type declared in
the limited-withed package?

Which of the following is code illegal?

with Parts;
package Whole is

   type Whole_Type is record
      Part : Parts.Part_Type;
   end record;

   type Whole_Access is access all Whole_Type;

end Whole;
 
 
limited with Whole;
package Parts is
 
   type Part_Type is record
      Prev : Whole.Whole_Access;
      Next : access Whole.Whole_Type;
   end record;
 
end Parts;


Regards,
Wojtek



             reply	other threads:[~2004-09-30 22:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-30 22:23 Wojtek Narczynski [this message]
2004-09-30 23:40 ` Ada0Y limited with Randy Brukardt
2004-10-01  7:52   ` Wojtek Narczynski
2004-10-01 18:30     ` Randy Brukardt
2004-10-01 18:51       ` Wojtek Narczynski
replies disabled

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