Mam dość szkolny choć bardzo istotny dla mnie problem. Mam procedurę:
procedure TSynEditPrint.CalcPages;
{Calculates the total number of pages.}
var
AStr, Text: string;
StrWidth, i: Integer;
j: Integer;
AList: TList;
YPos: Integer;
PageLine: TPageLine;
procedure CountWrapped;
//Counts the number of lines a line is wrapped to
var
j: Integer;
begin
for j := 0 to AList.Count - 1 do
YPos := YPos + FLineHeight;
end;
begin
InitRanges;
for i := 0 to FPages.Count - 1 do
TPageLine(FPages[i]).Free;
FPages.Clear;
FMaxWidth := FMargins.PRight - FMargins.PLeft;
AStr := '';
FMaxCol := 0;
while FCanvas.TextWidth(AStr) < FMaxWidth do begin
AStr := AStr + 'W';
FMaxCol := FMaxCol + 1;
end;
FMaxCol := FMaxCol - 1;
W żaden sposób nie mogę zrozumieć konstrukcji :
for j := 0 to AList.Count - 1 do
YPos := YPos + FLineHeight;
Czego dotyczy zmienna Alist ? Przecież jest to zmienna wewnętrzna utworzona wewnątrz procedury i niczemu nie jest przypisana ?
Druga wątpliwość – na czym polega liczenie do wartości Alist.Count – skąd wiadomo jaka ta wartość jest ?
Podobnie się sprawa ma z wierszem
for i := 0 to FPages.Count - 1 do
TPageLine(FPages[i]).Free;
Przepraszam za lamerskie pytania , ale w żaden sposób przy pomocy literatury nie mogę tego rozgryźć. Będę szczerze zobowiązany za pomoc ponieważ sprawa jest dla mnie ważna.
{glowa} :[[ --Pzdr.
W.