From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,faf432dd4ca854d5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-27 23:44:05 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3B11F398.C40EC2B8@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Iterator trouble?? References: <3B11AD72.DC475A32@ida.his.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 28 May 2001 06:44:08 GMT NNTP-Posting-Host: 38.29.181.12 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 991032248 38.29.181.12 (Sun, 27 May 2001 23:44:08 PDT) NNTP-Posting-Date: Sun, 27 May 2001 23:44:08 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sun, 27 May 2001 23:42:14 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:7826 Date: 2001-05-28T06:44:08+00:00 List-Id: 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