DIMENSION arr[128]
SELECT M, 0000 重复数, 重复字符 FROM cf INTO CURSOR tmp READWRITE
SELECT tmp
BLANK FIELDS 重复字符 ALL
SCAN STORE 0 TO arr cM = ALLTRIM(M) FOR i=1 TO LEN(cM) ch = ASC(SUBSTR(cM,i,1)) arr[ch] = arr[ch] + 1 ENDFOR FOR i=1 TO 128 IF arr[i] > 1 REPLACE 重复数 WITH 重复数+1, 重复字符 WITH 重复字符-CHR(i) ENDIF ENDFOR
ENDSCAN
GO TOP
BROWSE