作者在 2006-09-25 06:18:00 发布以下内容
***
***随机生成字母数字组合 (C)Copyright 2006-2006 Tiger5392
***
PARAMETERS nNum
PRIVATE nNum,cText,nCnt,nRand
nNum=IIF(TYPE("nNum")=CHR(78) AND INT(nNum)=nNum AND nNum>0,nNum,6)
cText=[]
FOR nCnt=1 TO nNum
nRand=RAND()
DO CASE
CASE nRand<=10/62
cText1=CHR(48+nRand*62)
CASE nRand<=36/62
cText1=CHR(65+nRand*62-10)
OTHERWISE
cText1=CHR(97+nRand*62-36)
ENDCASE
cText=cText+cText1
ENDFOR
RETURN cText
***随机生成字母数字组合 (C)Copyright 2006-2006 Tiger5392
***
PARAMETERS nNum
PRIVATE nNum,cText,nCnt,nRand
nNum=IIF(TYPE("nNum")=CHR(78) AND INT(nNum)=nNum AND nNum>0,nNum,6)
cText=[]
FOR nCnt=1 TO nNum
nRand=RAND()
DO CASE
CASE nRand<=10/62
cText1=CHR(48+nRand*62)
CASE nRand<=36/62
cText1=CHR(65+nRand*62-10)
OTHERWISE
cText1=CHR(97+nRand*62-36)
ENDCASE
cText=cText+cText1
ENDFOR
RETURN cText