var
F : TextFile;
X : Integer;
Y : Integer;
S : String;
begin
AssignFile(F, FileName);
Reset(F);
for X := 0 to 9 do begin
ReadLn(F, S);
for Y := 0 to 9 do begin
Table[X,Y].Image := StrToInt(S[Y]); <-- Blir ett exception här när programmet körs...
Table[X,Y].Visible := Bool(Table[X,Y].Image);
Table[X,Y].Rect.Left := X*BlockWidth;
Table[X,Y].Rect.Right := (X+1)*BlockWidth;
Table[X,Y].Rect.Top := Y*BlockHeight;
Table[X,Y].Rect.Bottom := (Y+1)*BlockHeight;
end;
end;
CloseFile(F);
StrToInt converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToInt raises an EConvertError exception.
255 ms totalt · 4 externa anrop · v20260731065814-full.1dc6f849