LazStats: Remove remaining goto instructions from the crosstab BreakDown procedure

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7711 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-09-28 21:18:41 +00:00
parent 3cf367a1dc
commit 746509e94a

View File

@ -102,8 +102,6 @@ type
procedure TCrossTabCalculator.BreakDown;
label
2,3,4;
var
i, j, row, col, bigmax: integer;
ptr1, ptr2: Integer;
@ -168,23 +166,22 @@ begin
sum := 0;
row := row + 1;
2:
if ptr1 < 1 then
break;
subscript[ptr1-1] := subscript[ptr1-1] + 1;
if subscript[ptr1-1] <= levels[ptr1-1] then
goto 4;
if subscript[ptr1-1] > levels[ptr1-1] then
begin
repeat
ptr1 := ptr1 - 1;
if ptr1 < 1 then
break;
until subscript[ptr1-1] < levels[ptr1-1];
if ptr1 < 1 then
break;
subscript[ptr1-1] := subscript[ptr1-1] + 1;
end;
3:
ptr1 := ptr1 - 1;
if ptr1 < 1 then
break;
if subscript[ptr1-1] >= levels[ptr1-1] then
goto 3;
subscript[ptr1-1] := subscript[ptr1-1] + 1;
4:
for i := ptr1 + 1 to no_in_list do
subscript[i-1] := 1;
ptr1 := no_in_list - 1;