[futurebasic] Passing Blocks of Data

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

From: Mark Arnold <mda515t@...>
Date: Wed, 20 Oct 1999 16:35:44 -0500
I want to pass around a block of data between functions and I'm not sure
a) exactly how to do it, and b) if it's the best way to do things.

What I'm trying to do is:
'dim a block big enough for the data
DIM theData.8000

'this function goes out and grabs the block of data
'I can get this to work
FN GetRecord(gFileH&,whichRec&,24,@theData)

'here's where things break. I want to pass the block
'of data to another function to work on it. I'm getting gibberish.
numFields&=fn GetNumberMARCFields(gFileH&,theData)

Here's how the above function looks:

local fn GetNumberMARCFields(FIHndl&,@theData)
dim RecBase&,RecEntries&
dim RecBase$


end fn=RecEntries&

I've played with just about every combination of @theData and theData that
I can think of.

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.