如题
解决方案 »
- 关于一个可能比较傻的和编写组件有关的问题
- 东方国软公司怎么样?
- -----求rxlib for delphi 7-------
- ★抛砖引玉★我写的一个如何让edit具有记忆功能
- 我如何用clientdataset1.commandtext='select ... from ...'向SQL SERVER调用查询呢
- 请问高手!C代码:void uncompress(char *line) { register char *p = line; }如何改写为DELPHI代码?
- 关于OpenDialog
- 我哭了,这个stringGrid总是只显示一列
- TidTCPClient连接上TidTCPServer后,如果拔掉网线,TidTCPServer如何知道?
- Delphi开发的应用系统在XP下日期输入的问题.
- 告急十万火急
- 请问:怎样在窗体加载时创建9百9十9万9千9百9十9个(9999999)个CheckBox控件或者是TcheckBoxList并显示出来。
const
test='0.010100';
var
i:integer;
d,temp:double;
tempstr:string;
begin
d:=0;
tempstr:=copy(test,pos('.',test)+1,length(test));
for i :=1 to length(tempstr)-1 do
begin
temp:=strtoint(tempstr[i])*power(2,i);
if temp>0 then
d:=d+1/temp;
end;
showmessage(formatfloat('0.0000',d));
end;
,,,
依此类推0.101b表示0.1b + 0.01b=0.5d + 0.125d