Code: Select all
Dim MyArray(-1)
;of course also for ReDim
Code: Select all
Dim MyArray(0)
FreeArray (MyArray())
I often work with COM functions witch I combine in procedures. The COM arguments are in arrays. Sometimes there are arguments, sometimes there are no arguments:
Code: Select all
Procedure Proc1 (Array TestArray(1))
Debug "cntParams = " + Str(ArraySize (TestArray()) + 1)
;Some COM functions
EndProcedure
cntParams = 0
;Code needed now
If cntParams = 0
Dim MyArray(0)
FreeArray (MyArray())
Else
Dim MyArray(cntParams - 1)
EndIf
;Code needed in future
;Dim MyArray(cntParams - 1)
Proc1 (MyArray())