Есть 2 модуля Unit1 и projects
Листинг Unit1
Код:
type
project=array of record
name:string[50];
en,me,el:byte;
op:string[100];
end;
n_a=project;
procedure Rozdil(nomer:string);
begin
SetLength(n_a,n1);
n_a:=na();
end;
Листинг модуля projects
Код:
unit projects;
interface
const
n1=7;
type
project=array of record
name:string[50];
en,me,el:byte;
op:string[100];
end;
n_a=project;
function na():n_a;
implementation
uses Unit1, Dialogs, SysUtils;
function na():n_a;
var i:byte;
begin
try
SetLength(Result,n1);
for i:=0 to n1-1 do result[i].en:=i;
except
ShowMessage('Ошибка в блоке');
Abort;
end;
end;
end.
В строке SetLength(n_a,n1); "ошибка "(" expected but "," found"
Почему?