procedure TForm1.Button1Click(Sender: TObject);
var
  p,w,d,f:real;
  s:integer;
begin
    w:=strtofloat(txtweight.text);    这里的strtofloat和strtoint是什么意
    s:=strtoint(txtdistance.text);   思,帮我解释一下,他们有什么用,该怎
    p:=strtofloat(txtprice.text);    么用,有什么区别,谢谢
    case s of
    0..249:       d:=0;
    250..499:     d:=0.02;
    500..999:     d:=0.05;
    1000..1999:   d:=0.08;
    2000..2999:   d:=0.1;
    else
      d:=0.15;
    end;
    f:=p*w*s*(1-d);
    resultstr.caption:='运费为'+floattostr(f);
end;end.