comp.lang.ada
 help / color / mirror / Atom feed
From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: Limited Type Access
Date: Mon, 29 Oct 2001 13:27:27 -0500
Date: 2001-10-29T13:27:27-05:00	[thread overview]
Message-ID: <mailman.1004380133.32206.comp.lang.ada@ada.eu.org> (raw)

There is no limited type declared below.  You named your package
Limited_Access, but that doesn't make anything limited.  It's just
a name in this case.  You have to declare the type as limited.

There was a feature in Ada 83 that carries over to Ada 95.  You
couldn't pass a limited type object around, but you could pass
a pointer to the limited type object.

Frank

-----Original Message-----
From: ANH_VO@udlp.com [mailto:ANH_VO@udlp.com]
Sent: Monday, October 29, 2001 11:09 AM
To: comp.lang.ada@ada.eu.org
Subject: Limited Type Access


Greeting,

I could not figure out why the codes below compiled without any error. My
thought was that access type of a limited type is considered limited.
Therefore,
Object type must be limited because its component is limited. What did I
miss?
Thanks for your help.

Anh Vo

package Limited_Access is

   protected type Counting ( Start_Count : Positive := 1) is
      entry Secure;
      procedure Release;
      
   private
      Current_Count : Natural := Start_Count;
   end Counting;
   
   subtype Binary is Counting (Start_Count => 1);
   
   type Binary_Access is access all Binary;
   
   type Object is 
      record
         Sem : Binary_Access;
      end record;

end Limited_Access;
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada



             reply	other threads:[~2001-10-29 18:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-29 18:27 Beard, Frank [this message]
2001-10-29 23:59 ` Limited Type Access Mark Lundquist
  -- strict thread matches above, loose matches on Subject: below --
2001-10-29 16:08 ANH_VO
2001-10-29 18:19 ` Mark Lundquist
2001-10-29 19:16 ` Matthew Heaney
replies disabled

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