Help: ReDim an Array from within a Procedure
Posted: Sun Aug 20, 2006 3:15 am
I want to change the size of StringArray$() from within the procedure.
and the procedure
But this will only change the size of the array nameOfArrayToChange$() within the procedure, but I want to change the size of the global array StringArray$() from within the procedure. Is there any way to do this? Because I have a large number of arrays to handle I don't want to make a procedure for every single one where the only thing that changes is the array-name.
Further, if I hand over the array-name to the procedure it thinks that it is a linked list but than an array.
Code: Select all
global dim StringArray$(size)
ArrayProcedure(StringArray$, anySize)
Code: Select all
Procedure ArrayProcedure(nameOfArrayToChange$, newArraySize)
redim nameOfArrayToChange$(newArraySize)
endProcedure
Further, if I hand over the array-name to the procedure it thinks that it is a linked list but than an array.