四舍五入喽~
function xxxx(str:string):integer;
var
i:integer;
begin
i:=pos('.',str);
try
if i>0 then
if strtoint(str[i+1])>5 then
result:=strtoint(copy(str,0,i-1))+1
else
result:=strtoint(copy(str,0,i-1));
else
result:=strtoint(str);
except
result:=0;
end;
end;