Fast Allocate

Ed Kleban Ed at Kleban.com
Wed Nov 30 09:42:53 CST 2005




On 11/30/05 9:22 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 11/30/05 4:54 PM, "Sims, John" <ayu8 at cdc.gov> wrote:
> 
>>> Is there a faster way to allocate, say 1000 blank or
>>> common-value records all at once rather than simply calling
>>> SetBlank or filling up the memory buffer and then calling
>>> Table.AddRecord in a loop 1000 times?
>>> 
>>>  
>> 
>> Hi Ed,
>> 
>> If all of the values of all of the fields for all of the records are the
>> same, I am pretty sure you only need to call SetBlank once.
>>  
> 
> RIGHT
>  
>> I'm sure Ruslan will correct me if I am wrong.  All that said, if you
>> are changing just a couple of fields in each record, I think you can
>> still just call SetBlank once.
>>   
> Also right

Yes. I presumed that was the case.  What I'm curous about however is whether
there is a faster way to allocate a large number of table records all at
once having blank or common values without having to have a loop that calls
AddRecord.

In essence I'm looking for the equivalent of the RB "Dim" statement which
allows me to say:
    

    dim bigTable( 30 )  as Integer

rather than:

    dim bigTable() as Integer
    for I as integer = 1 to 30
    bigTable.append blankValue
    next





More information about the Valentina mailing list