为什么会出现这个错误Operator not applicable to this operand type?

woaiwd 2008-11-07 03:47:40

procedure TForm1.Button1Click(Sender:TObject);
begin
if edit1.text<>'' and edit2.text<>'' then
begin
ShowMessage('正确');
end
else
ShowMessage('不能为空');
end;

编译时为啥会出现Operator not applicable to this operand type错误呢?感觉哪也没写错呀?
...全文
1565 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hewen7100 2010-07-21
  • 打赏
  • 举报
回复
差两个括号
mizhihui93 2009-02-28
  • 打赏
  • 举报
回复
哈哈 我也出现这个错误
woaiwd 2008-11-07
  • 打赏
  • 举报
回复
晕,这么个小错误啊
aluyue 2008-11-07
  • 打赏
  • 举报
回复
if (edit1.text<>'') and (edit2.text<>'') then

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧