帮忙调试一下,实在是不会搞了
有BUG部分的全部源码,FoxPro 2.6 (dos)
&& *************************************
SET TALK OFF
SET ESCA OFF
SET SYSM OFF
CLEAR ALL
CLEAR
USE
USE password
SELECT password
DEFI WINDOW inputpas ;
FROM 0,0 TO 10,45 ;
DOUB ;
SHAD ;
TITL "Password" ;
COLOR SCHE 7
MOVE WINDOW inputpas CENT
ACTI WINDOW inputpas
TEXT
* * * * * * * N O T E * * * * * * *
Please type superuser password. if
you nope superuser please quit system.
ENDTEXT
@7,16 SAY "Ver:1.0?
@5,2 SAY " Password: "
KEY=0
i=1
COLL=15
DO WHILE .T.
m.passw=" "
SET CURS ON
COLL=15
DO WHILE KEY#13
KEY=INKEY(0)
IF KEY#13
IF KEY=7 .OR. KEY=19 .OR. KEY=127
COLL=COLL-1
IF COLL<15
COLL=15
WAIT WINDOW "Please input password." TIME 0.5
ENDIF
@5,COLL SAY " "
ELSE
IF COLL>33
WAIT WINDOW "Password out." TIME 2.0
COLL=33
ENDIF
@5,COLL SAY "*"
COLL=COLL+1
m.passw=m.passw+CHR(KEY)
ENDIF
ENDIF
ENDDO
LOCATE FOR ALLTRIM(password)=ALLTRIM(m.passw) &&已经查出问题就在这里,但如何修改?
IF ! FOUND()
IF i<3
WAIT "Password error." WINDOW TIME 0.5
@5,15 SAY SPACE(20)
m.passw=" "
KEY=0
i=i+1
@5,2 SAY " Password: "
GO TOP
LOOP
ELSE
WAIT "Sorry error! program exit." WINDOW
RELE WINDOW inputpas
SELE password
USE
QUIT
ENDIF
ELSE
WAIT WINDOW "password ok" TIME 1.5
RELE WINDOW inputpas
SELE password
USE
SET ESCA ON
SET SYSM ON
SET TALK ON
EXIT
ENDIF
ENDDO
&& **************************************