If I am right, **ptr is a pointer to an array of pointers to short integers... in delphi it is not used like this (thanks, Lord!).
If you know the lengths of the arrays when coding:
var a: array[0..10, 0..20] of short;
Then you pass a as paramter, and use a[0] as the first pointer, a[1]... etc.
If the lengths are not know (as i suppose), you just make this:
a: array of array of short;
And in the code, to set the lengths:
SetLength(a, 10); //10 pointers to arrays of shorts;
for i:= Low(a) to High(a) do
SetLength(a[i], 20); //Each one with 20 elements (could be different for each array)
So you don't need to play with pointers of pointer to pointer that point to shorts or any other tipycal C puzzles, just pass an "a" and it is done.
BitFarmer
Junior Poster in Training
51 posts since Nov 2009
Reputation Points: 12
Solved Threads: 5
Hi Khiro, you post a piece of code but don't ask anything at all... so?
BitFarmer
Junior Poster in Training
51 posts since Nov 2009
Reputation Points: 12
Solved Threads: 5