请问这段简单的程序有什么错误??谢谢(100分)

  • 主题发起人 happyallday
  • 开始时间
H

happyallday

Unregistered / Unconfirmed
GUEST, unregistred user!
if (edit1.text:='zb') and (edit2.text:='123')
then
form2.show
else
form1.close();
谢谢!
[Error] Unit1.pas(37): Operator not applicable to this operand type 错误提示
谢谢各位
 
應該是:
if (edit1.text='zb') and (edit2.text='123')
then
form2.show
else
form1.close();
等號前有':'是赋值語句﹐判斷語句不能有':'
 
agree上边
:= 赋值
= 判断
 
呵呵,谢谢各位,真心感谢!!
 
if (Edit1.Text = 'zb') and (Edit2.Text = '123') then
Form2.Show
else
Form1.Close;
 
来晚了,呵呵,楼主也赏点分吧!
 
来晚了,哎,分点羹吧
 
if (Edit1.Text = 'zb') and (Edit2.Text = '123') then Form2.Show
else Form1.Close;
请粘贴使用。
 
老大,你要仔细看看语法的哦!
[:D][:D][:D][:D]
 
顶部