[futurebasic] Re:Dynamic

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2008 : Group Archive : Group : All Groups

From: David Bailey <dbail@...>
Date: Mon, 4 Feb 2008 16:18:37 -0800
>
I like the ability of dynamic arrays to grow automatically if needed  
but how do you shrink an array?  If you have an array of 10000   
elements and you do something like x = array(65000) (not real code)  
the array will grow simply by reading the element.  Not needing the  
elements between 10000 and 65000 later I would like to reduce the  
array size to the largest number that was set by code not read by  
code.  Compress Dynamic seems to make no difference.  Writing my array  
with 65000 elements instead of 10000 makes megabites of difference.   
The only way I have found is to read 65000 elements then create a new  
array with the largest one found.  Ideas?


David