IanM, this pointer system looks to be just the thing I need for my project!
Can I double check that basically, I can now create say five 2D arrays that all require processing via one common function, and by using your pointer system I can now make this happen?
This is opposed to writing 5 very similar functions that are each exactly the same, with the only different being that the array name in each function changes for each array?
So with your pointer system, the below should work...
Dim Item() as String
ptr = Get Arrayptr( Item() )
Unlink Array Item()
ptr = Load_CSV(1, Get Arrayptr ( Item() ), "Item Data.CSV")
Dim Shop() as String
ptr = Get Arrayptr( Shop() )
Unlink Array Shop()
ptr = Load_CSV(1, Get Arrayptr ( Shop() ), "Shop Data.CSV")
Dim Theme() as String
ptr = Get Arrayptr( Theme() )
Unlink Array Theme()
ptr = Load_CSV(1, Get Arrayptr ( Theme() ), "Theme Data.CSV")
Although I'm yet to properly test it with 2D arrays, I believe it should work. But I'm also wondering about ways to simplify this further, if possible. Maybe with the use of some string variables, or perhaps another function?
EDIT: I can get pointers working with 1D arrays, but not 2D arrays. Could you hint at any tips?
EDIT 2: Here's an example to show you what I'm doing. This actually works well, so I'm wondering if I should implement this method, or attempt Array Pointers again?
Rem Project: 2D Array Function Test
Rem Created: Thursday, January 20, 2011
Rem ***** Main Source File *****
Global TempX
Global TempY
Dim Temp(0,0)
Fill_Array(2,3)
Dim Test1(TempX,TempY)
For X = 1 to TempX
For Y = 1 to TempY
Test1(X,Y) = Temp(X,Y)
Next Y
Next X
Fill_Array(3,4)
Dim Test2(TempX,TempY)
For X = 1 to TempX
For Y = 1 to TempY
Test2(X,Y) = Temp(X,Y)
Next Y
Next X
Print Test1(2,2)
Print Test2(2,2)
Wait key
End
Function Fill_Array(Data1,Data2)
TempX = Data1
TempY = Data2
UnDim Temp()
Dim Temp(Data1, Data2)
For X = 1 to Data1
For Y = 2 to Data2
Temp(X,Y) = Data1 + Data2 + X + Y
Next Y
Next X
Endfunction
EDIT 3: Gah. I shouldn't rush my code when I get excited! I found the problem (forgot to link the array back!!) and now the pointers are working perfectly for 2D arrays.

Very cool. Now I can manage my code much-much easier!