怎样把real型的转换为string数据类型的啊? 如题,谢了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Format('%0.4f', [real变量或常量]),返回值为字符型,如下:var tmpReal: Real; tmpStr: string;begin tmpReal := 123.343; tmpstr := Format('%4.4f', [tmpReal]);end;这样tmpStr的值就为:'123.3430' var str:string; temp:real;begin str := FloattoStr(temp);end; floattoStr()是啊。就这么。 var str:string; temp:real;begin str := FloattoStr(temp);end;这位仁兄写的就完全可以。 Str:=FloatToStr(Temp)Str:=FormatFloat('0.000',Temp) dbexpress保持连接的假死状态 报表中如何统计小计 关于active问题。 如何在delphi里面读取c的结构体,急 关于从新排序的问题 delphi6有补丁吗? About MaskEdit.text in Delphi6.0 做delphi的帮助文件,用什么软件好,哪有下载,留几个网址好吗?一个5分,前者得分 dana来领分;150要3贴真倒霉;唉,csdn.... 对于学习c语言,我觉得很困惑!大家能帮我吗? 哪儿有好的treeview组件呢?(没分了,sorry1) 用QUERY查找时,没有找到结果。要怎么样才会有提示信息出现?
var
tmpReal: Real;
tmpStr: string;
begin
tmpReal := 123.343;
tmpstr := Format('%4.4f', [tmpReal]);
end;这样tmpStr的值就为:'123.3430'
str:string;
temp:real;
begin
str := FloattoStr(temp);
end;
是啊。
就这么。
str:string;
temp:real;
begin
str := FloattoStr(temp);
end;
这位仁兄写的就完全可以。
Str:=FormatFloat('0.000',Temp)