comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Unchecked Deallocation?
Date: Fri, 12 Jul 2002 23:12:50 GMT
Date: 2002-07-12T23:12:50+00:00	[thread overview]
Message-ID: <wcc65zk1qx9.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: _YIX8.483917$352.79617@sccrnsc02

Caffeine Junky <nospam@hotmail.com> writes:

> 	function Clear_Stack(S : in Stack) return Boolean;

You want a procedure, here, with an 'in out' parameter.  Not a function.
You need to recursively free the whole list.
Your instantiation of Unchecked_Deallocation is correct.

> 	  return True;	   -- No reason for it not to return True in this --
> 				   -- instance, as far as I can tell.             --

Right, which is why you don't want a function.

- Bob



  reply	other threads:[~2002-07-12 23:12 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 [this message]
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
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox