How do you code around a ReDim Preserve?
An approach I used in one application was to REDIM only in "blocks" of many elements, as in..
Code:
%Array_Init_Size = 1000 %Array_Incr = 100 REDIM Foo(%Array_Init_Size) ' initial setting AddItems: DO yadda, yadda IF ItemCount > UBOUND (Foo,1) THEN REDIM PRESERVE Foo (UBOUND(Foo,1) + %Array_incr) ' add %array_incr elements to the array END IF yadda, yadda LOOP UNTIL ISTRUE(ArrayLoaded)
Oops, forgot one: we can wait for Microsoft to fix Win98.
MCM
Leave a comment: