Код:
procedure calculate;
var
sum2:real;
ADOtable3: tADOtable;
label3:tlabel;
adotable3pribol: TFloatField;
begin
sum2:=0;
adotable3.Active:=true;
adotable3.First;
while ADOTable3.Eof <>true do
begin
sum2:=sum2+ADOTable3pribol.Asfloat;
ADOTable3.Next;
end;
LABEL3.Caption:=floattostr(sum2);
adotable3.Active:=false;
end;
Код:
procedure TForm1.Button1Click(Sender: TObject);
begin
calculate;
end;
Код:
[DCC Warning] Unit1.pas(155): W1036 Variable 'ADOtable3' might not have been initialized
[DCC Warning] Unit1.pas(159): W1036 Variable 'adotable3pribol' might not have been initialized
[DCC Warning] Unit1.pas(162): W1036 Variable 'label3' might not have been initialized
При вызове выдает ошибку...можете сказать что я делаю не правильно
и как будет правильнее??