Hi, I'm not sure if this is the right section for this, but here it is:
program project1;
var
a,b,n:integer;
mat:array of array of real;
F:textfile;
begin
write('n=');
readln(n);
setlength(mat,n,n);
assign(F,'C:\Users\Julius\Desktop\fps\aaa.txt');
reset(F);
for a:=1 to n do
for b:=1 to n do
read(F,mat[a,b]);
close(F);
end.
The program is supposed to compute the inverse matrix to the matrix from the text file. I actually wrote the whole thing and it works, but now I'm trying to use dynamic arrays. When I run the program, I choose the n value, press enter and get an error message saying that project1 raised exception class External:SIGSEGV at the line with 'read(F,mat[a,b]);'.
Any help would be appreciated. Thanks.