From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Iterator trouble??
Date: Mon, 28 May 2001 06:44:08 GMT
Date: 2001-05-28T06:44:08+00:00 [thread overview]
Message-ID: <3B11F398.C40EC2B8@acm.org> (raw)
In-Reply-To: 3B11AD72.DC475A32@ida.his.se
Michael Andersson wrote:
>
> Why do I get the following compiler error?
> access discriminats allowed only for limited types
>
> with Spline_Pkg; use Spline_Pkg;
>
> package Spline_Pkg.SplineIterator_Pkg is
> type SplineIterator(S : access Spline) is limited private;
> function Next(Si : SplineIterator) return Point3;
> private
> type SplineIterator(S : access Spline) is
> record
> Index : Natural;
> end record;
> end Spline_Pkg.SplineIterator_Pkg;
>
This is because the full declaration of type Splineiterator is not
limited. You could make it limited by replacing "is record" with "is
limited record".
Note that "with Spline_Pkg;" is unnecessary; child packages
automatically have visibility to their parents.
--
Jeff Carter
"Your mother was a hamster and your father smelt of elderberries."
Monty Python & the Holy Grail
prev parent reply other threads:[~2001-05-28 6:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-28 1:44 Iterator trouble?? Michael Andersson
2001-05-28 6:44 ` Jeffrey Carter [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox