[futurebasic] Re: [FB] Dynamic true record creation

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2000 : Group Archive : Group : All Groups

From: Jay Reeve <jktr@...>
Date: Sun, 17 Dec 00 09:05:42 -0600
Oops, let's try that again. Trying to hurry. :-(

>I've been wanting to use the new true records (as apposed to the pseudo
>records) because of their ability to contain fields with the same names as
>fields in other true records. So far I don't know any way to allocate them
>dynamicly. I know I could blockmove the data back and forth between one
>record where I would work on it and dynamicly allocated memory where it
>would be stored, but that seems like a major waste. Any ideas?
begin record myRecordType
dim aString$
dim aLong&
dim anInt%
end record
dim recordsNeeded

recordsNeeded = 10000'This can be set dynamically, and changed later 
:'using call sethandlesize(theHndl,newSize)

xref@ myRecordArray(_maxInt) as myRecordType
myRecordArray = fn newHandle((recordsNeeded+1)*sizeof(myRecordType))

myRecordArray(1234).aString = "This is how you access fields in the 

 =J= a  y