哪位老兄帮忙看看为何程序调试无法通过?逻辑(5分)

  • 主题发起人 不是专家
  • 开始时间

不是专家

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if checkbox1.Checked =true then assignfile(passstring,'E:/temp/Delphi程序/试/图书管理程序/管理员.txt') else
assignfile(passstring,'E:/temp/Delphi程序/试/图书管理程序/学生.txt');
reset(passstring);
readln(passstring,passcache);
closefile(passstring);
times:=times+1;
if edit1.Text = passcache then

begin
if checkbox1.Checked =true then form5.show else form4.show;
end;

else //到这里调试无法通过

begin
if messagedlg('对不起,密码严重错误错误,是否修改?',mtconfirmation,[mbyes,mbno],0)=mryes then close;
else if times<3 then edit1.SetFocus ;
else
begin
messagedlg('对不起,密码严重错误!',mtinformation,[mbok],0);
application.Terminate ;
end;
end;
end.
 
你的else对应哪个if啊? 如果应该对应上面那个,请把end的分号去掉。

程序结构用if else太多会引起混乱的。
 
顶部