LazStats: Remove two goto instructions in the BreakDown method of CrossTabUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7710 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-09-28 21:11:20 +00:00
parent 85f0568fb3
commit 3cf367a1dc

View File

@ -44,21 +44,14 @@ type
procedure SelListDblClick(Sender: TObject);
procedure VarListDblClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
private
{ private declarations }
FReportFrame: TReportFrame;
FAutosized: Boolean;
// procedure Initialize;
// procedure GetLevels(AReport: TStrings);
// function IndexPosition(x: IntDyneVec): integer;
// Procedure Tabulate;
// procedure BreakDown(AReport: TStrings);
procedure Prepare(out AVarList, AColNoSelected: IntDyneVec);
procedure UpdateBtnStates;
public
{ public declarations }
procedure Reset; override;
end;
@ -110,7 +103,7 @@ type
procedure TCrossTabCalculator.BreakDown;
label
1,2,3,4, printgrid;
2,3,4;
var
i, j, row, col, bigmax: integer;
ptr1, ptr2: Integer;
@ -148,7 +141,8 @@ begin
col := 1;
row := 1;
1:
while true do
begin
index := IndexPosition(subscript);
outline := 'For cell levels: ';
for i := 1 to no_in_list do
@ -165,7 +159,7 @@ begin
subscript[ptr2-1] := subscript[ptr2-1] + 1;
col := col + 1;
if subscript[ptr2-1] <= levels[ptr2-1] then
goto 1;
continue;
FReport.Add('Sum across levels: %3d', [sum]);
FReport.Add('');
@ -176,7 +170,7 @@ begin
2:
if ptr1 < 1 then
goto printgrid;
break;
subscript[ptr1-1] := subscript[ptr1-1] + 1;
if subscript[ptr1-1] <= levels[ptr1-1] then
@ -185,7 +179,7 @@ begin
3:
ptr1 := ptr1 - 1;
if ptr1 < 1 then
goto printgrid;
break;
if subscript[ptr1-1] >= levels[ptr1-1] then
goto 3;
subscript[ptr1-1] := subscript[ptr1-1] + 1;
@ -196,9 +190,8 @@ begin
ptr1 := no_in_list - 1;
col := 1;
goto 1;
end;
printgrid:
title := 'CELL FREQUENCIES BY LEVELS';
for i := 1 to row - 1 do
begin