Je veux lancer ma fonction swap comme ceci :

type
monTableau: array of array of Integer
setlength(monTableau,NbLignes,NbColonnnes);
... Code ...
TForm2.swap(0,0,5,5,monTableau);

Cependant, il met une erreur lors de la compilation sur "array of array of Integer" de la fonction swap, alors que monTableau est bien reconnu



Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
procedure TForm2.Swap(i,j,n1,n2: Integer,tab: array of array of integer);
begin
    tab[i, j]:=tab[i, j] xor tab[n1, n2];
    tab[n1,n2]:=tab[i, j] xor tab[n1, n2];
    tab[i, j]:=tab[i, j] xor tab[n1, n2];
end;