I have 2 2-dimensional arrays and a function.
I would like that function to take the array as an argument.
I tried code like this:
var array1:array[1..10,1..10] of integer;
array2:array[1..20,1..10] of integer;
function name(var my_array:array of array of integer, n:integer);
function name(var my_array:array[1..n,1..10] of integer;const n:integer);
But I got errors while trying to compile the code. Any tips?
If you would like me to paste error codes for each version please leave a comment with a request.
For
function name(var my_array:array of array of integer, n:integer);
The error code is: "Incompatible type for arg no. : Got "Array[0..10] of Array[0..10] of SmallInt", expected "Open array od SmallInt" every time I call the function.