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