comp.lang.ada
 help / color / mirror / Atom feed
From: Caffeine Junky <nospam@hotmail.com>
Subject: Re: Unchecked Deallocation?
Date: Sat, 13 Jul 2002 03:10:49 GMT
Date: 2002-07-13T03:10:49+00:00	[thread overview]
Message-ID: <ZSMX8.41570$Jp.73594@rwcrnsc53> (raw)
In-Reply-To: 0iMX8.163$9H5.5573815@newssvr13.news.prodigy.com

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



      reply	other threads:[~2002-07-13  3:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-12 22:44 Unchecked Deallocation? Caffeine Junky
2002-07-12 23:12 ` Robert A Duff
2002-07-13  0:52   ` Caffeine Junky
2002-07-13  3:00     ` R. Tim Coslet
2002-07-13  2:31   ` tmoran
2002-07-13  3:10     ` Caffeine Junky [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