Delphi返回指定数值的绝对值,计算正负数绝对值的例子,FloatToStr(Abs)函数用法代码,示例中计算了小数、整数两种数据类型的绝对值,单击对应的箭头,即可查看计算结果,对应的三种计算方法,请参见以下代码:  procedureTForm1.SpeedButton1Click(Sender:TObject);  begin  Edit2.Text:=FloatToStr(Abs(-1.5));  end;  procedureTForm1.SpeedButton2Click(Sender:TObject);  begin  Edit4.Text:=FloatToStr(Abs(-200));  end;