注册 登录
编程论坛 单片机编程

delphi 7 计算器问题

陌简言 发布于 2013-11-08 10:58, 4073 次点击
大家好 我是学习delphi7.0的新手 我想请教一下 我在“=”的按钮事件上设置代码
if trim(statictext1.Caption)='pow' then
edit3.Text:=FloatToStr(power(Strtofloat(edit1.text),Strtofloat(edit2.text)));
if trim(statictext1.Caption)='sqrt' then
edit3.Text:=FloatToStr(sqrt(Strtofloat(edit1.text)));
end;
“+”、“-”能正常得显示出计算结果。为什么开方和幂函数不行呢?


发错地方了 不好意思哈

[ 本帖最后由 陌简言 于 2013-11-8 11:04 编辑 ]
0 回复
1