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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d38b71c771be34e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-12 20:10:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!wn2feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: Caffeine Junky Subject: Re: Unchecked Deallocation? Newsgroups: comp.lang.ada References: <0iMX8.163$9H5.5573815@newssvr13.news.prodigy.com> User-Agent: Pan/0.11.3 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "tmoran" Message-ID: NNTP-Posting-Host: 12.245.48.122 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1026529849 12.245.48.122 (Sat, 13 Jul 2002 03:10:49 GMT) NNTP-Posting-Date: Sat, 13 Jul 2002 03:10:49 GMT Organization: AT&T Broadband Date: Sat, 13 Jul 2002 03:10:49 GMT Xref: archiver1.google.com comp.lang.ada:27041 Date: 2002-07-13T03:10:49+00:00 List-Id: On Fri, 12 Jul 2002 22:31:24 -0400, tmoran wrote: > What particular stack might you possibly mean to free? If your > program > used pointers to integers, would you say "Free(Integer)" when you wanted > to get rid of one? You need, as the error message said, to call Free > with the name of a particular stack to free, presumably S in this case, > not the name of a type. Since the parameter to Free is "in out", S will > have to be "in out", which means Clear_Stack can't be a function (as > previously pointed out). A function that always returns the same value > is not much of a function, anyway. And as pointed out, you probably > don't really just want to deallocate the single cell, but rather a whole > list of them. Calling a pointer to a cell a stack sets you up for this > confusion. You have three different kinds of entities: a data-containing > cell, a pointer to such a cell, and a list of related cells. Better to > use three different names for three different things. Your right. That little error in my logic came to light when I was fixing the program. I'll need to pay better attention to what I'm doing from now on. >> Cell is defined in the private type and is only accessible via the > The private part of a package spec *is* visible to the body of that > package, just not visible to other packages. If it was not visible to > *any* package body it would be of mighty limited utility. That much is certain. Guess I'll be brushing up on access values and data types tonight. :-p Thanks for the pointers.(No pun intended.) St4pL3