Is there away to point to an Array
SXlee
Posts: 47
Hi all
Is there away to point to an Array and get it's dimension(upper bound), so I can pass them to a sub/function.
I'm doing it like this now, but it takes a lot of space.
SXlee
Is there away to point to an Array and get it's dimension(upper bound), so I can pass them to a sub/function.
Array_1 VAR Byte(16) Array_2 VAR Byte(14) Array_3 VAR Byte(11) Array_4 VAR Byte(16)Like so
Sub MySub2 FOR idx = 0 TO 3 DealWith_Array ThisArray, UBound Next i EndSub Sub DealWith_Array FOR idx = 0 TO UBound TheArray(i)=i ......... ......... ......... ......... ......... Next i EndSub
I'm doing it like this now, but it takes a lot of space.
Sub MySub1 DealWithArray_1 DealWithArray_2 DealWithArray_3 DealWithArray_4 EndSub Sub DealWithArray_1 FOR idx = 0 TO 15 Array_1(i)=i ......... ......... ......... ......... ......... Next i EndSub Sub DealWithArray_2 FOR idx = 0 TO 13 Array_2(i)=i ......... ......... ......... ......... ......... Next i EndSub Sub DealWithArray_3 FOR idx = 0 TO 10 Array_3(i)=i ......... ......... ......... ......... ......... Next i EndSub Sub DealWithArray_4 FOR idx = 0 TO 15 Array_4(i)=i ......... ......... ......... ......... ......... Next i EndSub
SXlee
Comments
The Ubound parameter was not my first concern, pointing to an Array was my first.
But if you can do it with Ubound you can do it with an array.
Thank you!
SXlee