Redimming Arrays

Blitz3D Forums/Blitz3D Beginners Area/Redimming Arrays

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

As long as you initially Dim an array in the main program you can Dim it again anywhere, including in functions, but as was said above, all the existing values will be deleted.

A Redim command which preserves the data would be near to the top of my Blitz wishlist. As it stands, you need to have a spare array for each different array data type you might want to re-dimension - including custom type pointer arrays - which is ridiculous when all that is (mostly) required is a routine to copy the area of memory where the array data is stored.