[futurebasic] Re: [FB] re: To _clear things up.

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2004 : Group Archive : Group : All Groups

From: tedd <tedd@...>
Date: Mon, 30 Aug 2004 21:36:32 -0400
>On Monday, August 30, 2004, at 05:47  PM, tedd wrote:
>
>>I assume that the old way of doing it cleared all the newly 
>>acquired memory to zero
>
>Ahh. If that's what you want (and I don't think it was ever 
>available from the toolbox), try this. This is untested, so remove 
>the bugs before using. :-)
>
>  e-e
>  =J= a  y
>   "
>
>local fn SetHandleSizeClear(h&, newSize&)
>'~'9
>// Assumes a valid handle
>dim oldSize&,err&
>oldSize = fn GetHandleSize(h)
>SetHandleSize(h, newSize)
>err     = fn memError
>if err then exit fn
>if oldSize < newSize then blockZero([h] + oldSize, newSize - oldSize)
>end fn = err
>
>--

Jay:

You can see my solution in the linked list code I sent you.

tedd
-- 
--------------------------------------------------------------------------------
http://sperling.com/