var
temp:int64;
j:integer;
y:int64;
begin
temp:=strtoint64('$'+'666696C0');
label1.Caption:=inttostr(temp);
y:=temp;
j:=y/(65536*128);
end;报错[Error] Unit1.pas(44): Incompatible types: 'Integer' and 'Extended'
如何解决,谢谢
temp:int64;
j:integer;
y:int64;
begin
temp:=strtoint64('$'+'666696C0');
label1.Caption:=inttostr(temp);
y:=temp;
j:=y/(65536*128);
end;报错[Error] Unit1.pas(44): Incompatible types: 'Integer' and 'Extended'
如何解决,谢谢
解决方案 »
- 用EmbeddedWB怎么修改浏览器的appName???
- 类似于 delphi IDE里面的 可拖动 窗体 用什么delphi控件 可实现?
- 大家看看这段代码应该怎么改?
- listview 如何设置item 的cation 不能为空,谢谢!
- 如何改变可执行文件的图标?
- QuickReport中如何进行树型(tree)的打印功能
- 请问:怎样使 memo或rich edit 在lines.add后能focus 在最后一行呢?
- 小问题:DBGrid在选择上下行时有没有什么触发事件?
- 向各位高手,delphi中询求有关单据设计和打印的程序???
- 如何保护自己的软件?
- 有没帅哥给解释一下HOOK,勾子函数是什么东东?我的参考书上都没提到。。
- 急!急!急!用ADO的组件做的程序在估成安装程序时要不要附带什么??
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
temp:int64;
k:Extended;
z:Extended;
y:int64;
x:double;
j:integer;
i:integer;
begin
temp:=strtoint64('$'+'666696C0');
label1.Caption:=inttostr(temp);
y:=temp;
k:=0;
i:=0;
j:=y div (65536*128);
z:=((2*y)mod(65536*256))/2;
if(j>=127) then begin
for i:=1 to (j-127) do begin
x:=x*2
end;
end
else begin
for i:=1 to (127-j)do begin
x:=x/2 ;
end;
z:=z*2;k:=1;
for i:=1 to 23 do begin
k:=k*2;
x:=x+1/k;
z:=z*2;
end;
x:=x*Z/64;
edit1.text:=floattostr(x); end;end;end.
运行上一段程序时,edit1的text好象没有变化,为什么?
另外,可否请教如何取一个数化为二进制时的某个特定的位