I keep getting:
[DCC Warning] NoiseFilter.pas(6879): W1036 Variable 'number' might not have been initialized
Even if I add number:=0; to the procedure, I will still get the warning.
Anyway to get rid of this warning. I get 100 times because it is in 100 procedures of the same kind.
here's the code:
procedure TNoiseForm.edt001Exit(Sender: TObject);
var
Code: Integer;
number:float;
CurrEdit: textEdit;
begin
CurrEdit := Sender as textEdit;
if CurrEdit.Text <> '' then
begin
Val (CurrEdit.Text, Number, Code);
if Code <> 0 then
begin
CurrEdit.SetFocus;
MessageDlg ('The edit field number ' +
IntToStr (CurrEdit.Tag) +
' does not have a valid number',
mtError, [mbOK], 0);
end;
end;
if methodradiogroup.itemindex=1 then store[1]:=round(number)
else stored[1]:=number;
end;
Thanks.
[DCC Warning] NoiseFilter.pas(6879): W1036 Variable 'number' might not have been initialized
Even if I add number:=0; to the procedure, I will still get the warning.
Anyway to get rid of this warning. I get 100 times because it is in 100 procedures of the same kind.
here's the code:
procedure TNoiseForm.edt001Exit(Sender: TObject);
var
Code: Integer;
number:float;
CurrEdit: textEdit;
begin
CurrEdit := Sender as textEdit;
if CurrEdit.Text <> '' then
begin
Val (CurrEdit.Text, Number, Code);
if Code <> 0 then
begin
CurrEdit.SetFocus;
MessageDlg ('The edit field number ' +
IntToStr (CurrEdit.Tag) +
' does not have a valid number',
mtError, [mbOK], 0);
end;
end;
if methodradiogroup.itemindex=1 then store[1]:=round(number)
else stored[1]:=number;
end;
Thanks.