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,ca85d557480cf473 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-07 10:15:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!sfo2-feed1.news.algx.net!jfk3-feed1.news.algx.net!dfw3-feed1.news.algx.net!allegiance!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3D287712.1206C06D@computer.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: Hiding a type References: <3D27263F.7070101@hotmail.com> <7kJV8.2438$gy3.1099236449@newssvr12.news.prodigy.com> <3D2733F4.8010304@hotmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 07 Jul 2002 17:15:02 GMT NNTP-Posting-Host: 63.184.105.64 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1026062102 63.184.105.64 (Sun, 07 Jul 2002 10:15:02 PDT) NNTP-Posting-Date: Sun, 07 Jul 2002 10:15:02 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:26926 Date: 2002-07-07T17:15:02+00:00 List-Id: Simon Wright wrote: > > "Frank J. Lhota" writes: > > > package Test is > > type Public_Name is limited private; > > function Initialize( File_Name : String ) return Public_Name; > > procedure Process( Input : Public_Name ); > > private > > type Private_Type is record ... end record; > > type Public_Name is access all Private_Type; > > end Test; > > I don't know if this will compile, but it's certainly not possible to > use it; if Public_Name is _limited_ private, clients have no > assignment operation. The OP stated that he didn't want the client to create variables of the type, but instead pass function results to other subprograms. So this could be used as Process (Input => Initialize ("File_Name") ); -- Jeff Carter "You couldn't catch clap in a brothel, silly English K...niggets." Monty Python & the Holy Grail