下面是一个可以控制密码的程序示例。
Local Integer I,J,C,M,F
Local Char PASS(10), ERROR(80), L(1)
PASS = decrypte(PASSEWORD) : # the password to be checked
J = len(PASS)
For I = 1 To J
L = mid$(PASS,I,1)
If L >= "A" and L <= "Z"
C+= 1
Endif
Next I
If C = 0
Errbox "There must be some capital letter in your password"
GMENDEP="".
End
Endif
For I = 1 To J
L = mid$(PASS,I,1)
If L >= "a" and L <= "z"
M+=1
Endif
Next I
If M = 0
Errbox "There must be some minus letter in your password"
GMENDEP="".
End
Endif
For I = 1 To J
L = mid$(PASS,I,1)
If L >= "0" and L <= "9"
F += 1
Endif
Next I
If F = 0
Errbox "There must be some figure in your password"
GMENDEP="".
End
Endif
If C + M + F = J
Errbox "There must be some odd character in your password"
GMENDEP="".
Endif
End
GMENDEP = "" prevent user login.