procedure TForm1.Button1Click(Sender: TObject); var aa: Currency; begin aa := $0; if aa = $0 then ShowMessage('aa=$0!'); end;
procedure TForm1.Button1Click(Sender: TObject); var aa: Currency; begin aa := 0; if aa = 0 then ShowMessage('aa=0!'); end; 即使这样也对,看来你要告诉我你的aa是不是Currenty类型了
对不起steps,今天才看到你的信息。所以才回复。我的事情具体是这样的。其实那个aa是我从一个数据库里取出来的一个数据。代码如下: aa:=query1.fieldbyname('费率').ascurrency; if aa=0 then begin ... end; 你看这有什么问题吗?
if aa = $0 then
if aa = $0 then
我是做了试验才写这条的
你用的什么Delphi???
告诉我出错信息好吗?
var
aa: Currency;
begin
aa := $0;
if aa = $0 then
ShowMessage('aa=$0!');
end;
var
aa: Currency;
begin
aa := 0;
if aa = 0 then
ShowMessage('aa=0!');
end;
即使这样也对,看来你要告诉我你的aa是不是Currenty类型了
aa:=query1.fieldbyname('费率').ascurrency;
if aa=0 then
begin
...
end;
你看这有什么问题吗?