#18
得分:0
回复于:
2012-10-30 14:36:01
精士达2009 A9+P
procedure TMain_frm.XK319_D2;
var
nWt,buff,s2:string;//?óê??o′?
i: Integer;
begin
buff:='';
buff:=Trim(Comm1.Input) ;
//???é
If length(buff)>9 then exit;
If Pos('=',buff)<1 then exit;
s2 := '';
for i := 1 to Length(BUFF) do
if BUFF[i] in ['0'..'9', '.'] then
s2 := BUFF[i] + s2;
nWt:='';
nWt:=FormatFloat('0.000',StrToFloat(s2));
Comm1.DataCount :=0;
if StrToInt(nWt)>0 THEN
shpSensor.Brush.Color :=clRed
else begin
shpSensor.Brush.Color :=clOlive ;
end;
edtNowWt1.Caption :=nWt;
end;
|