I can generalize getting the dimensions of arrays.
(not too messy, but each macro call must have a different dummy).
Perhaps you could try similar for your offset, and perhaps use GET_DIMENSION to save passing 3 parameters?
Just a thought!
Code: Select all
function _temp(array() as _datatype) as integer
Dim _d As Integer
mov esi, [ebp+8]
mov eax, [esi+16]
mov [_d], eax
dim as integer DIMENSION
dim as double a(1 to 5,3 to 9,8 to 10)
dim as byte b(1 to 5,4 to 9,3 to 7,2 to 6)
as single x,y
dim as vector v(1 to 4,2 to 9)