[futurebasic] Re: [FB] Passing Blocks of Data

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: tedd <tedd@...>
Date: Thu, 21 Oct 1999 09:49:42 -0400
>I have several questions. Is what I'm trying to do even possible? If it is,
>is this the best way to do it? Should I copy everything into a handle and
>work with that instead? I'm working with a couple of thousand records, and
>I know from experience that creating handles, filling them, manipulating
>the data, then throwing them away takes a lot of time. I'd appreciate any
>ideas you may have. TIA.
>
>-mark-

-mark-

I had the same problem with several applications. However, I solved it with
a linked list. A linked list makes _one_ handle. When you want to "pass"
your data to a function, you simply use (or pass) the handle to the block
of memory and the offset to the specific data you want your function to use.

What's nice about using a linked list approach is that: 1) You don't have
to know in advance how much data you need -- you can add/substract memory
as you need on the fly; 2) You don't have to move memory around -- which
takes time; 3) You only have one handle and one offset to find any specific
data.

Check out the linked list on my web site.

tedd

___________________________________________________________________
<mailto:tedd@...>	               http://sperling.com/