P phil302 Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #1 我在一个程序设计时想用一个密码保护。如果有人有试密码的话,他只有三次机会,在第三次没填写正确后自动关闭程序,请问用for语句,望能给出程序实例!!
烂 烂泥 Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #2 http://www.gislab.ecnu.edu.cn/delphibbs/dispq.asp?LID=262879
H hpretty Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #4 for i:=1 to 3do begin if password=yourpassword then else showpassageform; end
S SuperMMX Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #5 for i := 1 to 3do begin ShowPasswordForm; if password = yourpassword then begin flag := True; break; end; end; if flag then Enter else Exit;
for i := 1 to 3do begin ShowPasswordForm; if password = yourpassword then begin flag := True; break; end; end; if flag then Enter else Exit;
H happy3001 Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #6 times:=0; for i:=1 to 3do begin passform.show; if pass<>truepass then times:=time+1; else do ;//enteryourprogram end; exit;
times:=0; for i:=1 to 3do begin passform.show; if pass<>truepass then times:=time+1; else do ;//enteryourprogram end; exit;
K Kang Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #8 上面的for语句怎么好象对不对都要执行三次 为什么不用while或repeat
T tasam Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-10 #10 不用for。 先定义一个全局变量times,在输完口令的判断之前加一个inc(times), 然后在OnFormClose里判断times<3 then Action:=caNone else Application.terminate
不用for。 先定义一个全局变量times,在输完口令的判断之前加一个inc(times), 然后在OnFormClose里判断times<3 then Action:=caNone else Application.terminate
P phil302 Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-22 #12 不是我才给个位分是因为我上网的地方太慢我刷新6次才上来,sorry