求高手相帮
IF val(skh1)>val(skh2)
stmp=skh1
skh1=skh2
skh2=stmp
ENDIF
stmp='54158632'
skha=str(evaluate(skh1)+evaluate(stmp),8)
skha=strtran(skha,' ','0')
stmp='48765213'
skhb=str(evaluate(skh2)+evaluate(stmp),8)
skhb=strtran(skhb,' ','0')
stmp=''
nmod=asc('9')
FOR i=1 to 8
ntmp=(asc(substr(skha,i,1)))
FOR j=1 to 8
ntmp=ntmp+(asc(substr(skhb,j,1)))
ENDFOR
ntmp=asc('0')+mod(mod(ntmp,nmod),10)
nmod=ntmp
stmp=stmp+chr(ntmp)
ENDFOR
IF szch=stmp
CREATE cursor registtmp(skh c(8),ekh c(8),zch c(8))
sfile=home()+'sfsys.ini'
IF file(sfile)
APPEND from (sfile) sdf
ENDIF
LOCAL zchtmp(1)
SELECT zch from registtmp where skh==skh1 and ekh==skh2 into array zchtmp
IF _tally>0
UPDATE registtmp set zch=stmp where skh==skh1 and ekh==skh2
ELSE
INSERT into registtmp (skh,ekh,zch) values (skh1,skh2,stmp)
ENDIF
SELE registtmp
COPY to (sfile) fields skh,ekh,zch sdf
MESSAGEBOX('添加成功',48,'提示信息')
ENDIF
ENDWITH