I need to have a function which takes an array as a parameter and initializes it, as well as putting stuff in it. Returning the array is not really an option, as I'm trying to keep the interface the same as the dll I'm wrapping.
EG:
But of course, I get an attempt to access array index out of bounds if I try to read or write to the array. I'm sure this is easy and I'm just being a putz, but for the life of me, I can't find it in the docs or the Wiki.
EG:
Type SomeType Field SomeStuff:Int Field SomeOtherStuff:Float End Type Global P:SomeType[] Global ArraySize:Int InitArray(P,ArraySize) Function InitArray(A:SomeType[],Sz:Int Var) Local Size=Getsize() ' FUNCTION SOMEWHERE ELSE A=New SomeType[Size] Sz=Size End Function
But of course, I get an attempt to access array index out of bounds if I try to read or write to the array. I'm sure this is easy and I'm just being a putz, but for the life of me, I can't find it in the docs or the Wiki.