Dear pascallers,
I got
Segmentation fault (core dumped)
to the following simple program
CONST NMAX = 1000;
TYPE NRANGE=1..NMAX;
MATRIX=ARRAY[NRANGE,NRANGE] OF DOUBLE;
var N,M: NRANGE; A: MATRIX;
procedure transp(var n,m:nrange; a: matrix);
var i,j : nrange;
z : matrix;
begin
for i := 1 to n do
for j := 1 to n do
z[i,j] := a[j,i];
a := z;
end;
begin
a[1,1] := 1; a[1,2] := 2; a[1,3] := 3;
a[2,1] := 4; a[2,2] := 5; a[2,3] := 6;
transp(n,m,a)
end.
Thanks in advance for help, K. Veselic