In my for loop I used break statement to break loop after some match. But when I compile my code I got error for break:
Error: Illegal expression
Could you help me? I should add some unit?
for i:=0 to length(carsList)-1 do
begin
if numer <> carsList[i].numer then
begin
tmpKw2 := carsList[i].rectangleRotate(carsList[i].angle);
if((polyLine(tmpKw2,linia.p1.x,linia.p1.y,linia.p2.x,linia.p2.y))) then
begin
kolizja := true;
break:=true;
maxV := carsList[i].v;
Break;
end;
end;
end;