Hi, I've put it in Helpful tip for no other option. With this code:
function FillRFIndexes(rfindexesInteger):Integer;
var
i:Integer;
zinteger;
begin
Result:=0;
z:=rfindexes;
if rfindexes=nil then
exit;
for i:=0 to {some}.Count-1 do
begin
if {some condition} then
begin
Inc(Result);
try
rfindexes^:=i;
Inc(rfindexes,sizeof(Integer));
except
Result:=0;
break;
end;
end;
end;
rfindexes:=z;
end;
The compiler warns 'Value assigned to rfindexes never used'. It's not correct, because the rfindexes value it is used in the function return. It's a delphi 7 issue.
function FillRFIndexes(rfindexesInteger):Integer;
var
i:Integer;
zinteger;
begin
Result:=0;
z:=rfindexes;
if rfindexes=nil then
exit;
for i:=0 to {some}.Count-1 do
begin
if {some condition} then
begin
Inc(Result);
try
rfindexes^:=i;
Inc(rfindexes,sizeof(Integer));
except
Result:=0;
break;
end;
end;
end;
rfindexes:=z;
end;
The compiler warns 'Value assigned to rfindexes never used'. It's not correct, because the rfindexes value it is used in the function return. It's a delphi 7 issue.