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,ab66185f2bca0483 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-14 13:42:57 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Extension of non-limited type needs limited component User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Thu, 14 Nov 2002 21:41:29 GMT Content-Type: text/plain; charset=us-ascii References: <2dbd76f3.0211130203.7d2d14fd@posting.google.com> <2dbd76f3.0211140133.5ed196fb@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:30905 Date: 2002-11-14T21:41:29+00:00 List-Id: michael.jackson5@virgin.net (Mike) writes: > Am I allowed to create my own pointer-to-limited type and de-reference > it for use later? Yes. You just need to say ".all" whenever you want to call the preexisting procedures. The only problem with using a pointer that then you have to worry about storage management. You'll probably end up allocating the thing in the heap (with "new"), and then you have to worry about deallocating it. >... Wouldn't the act of de-referenceing be an implicit > assignment? No. "X.all" returns the heap object that the pointer points at. It does not fetch the value out of that object. The fetch operation is really what limited types want to disallow. When you say P(X.all), the heap object will be passed by reference if it is really limited -- no copy is made. - Bob