谢谢啦,完全能用。
太好啦
太好啦
CLEAR CSTR=[12435789426473940012] AA=[] CREATE CURSOR T (A C(2),B N(2)) N=1 FOR I=1 TO LEN(CSTR) CSTRA=IIF(BETWEEN(SUBSTRC(CSTR,I,1),[0],[4]),[小],[大]) IF CSTRA!=AA N=N+1 ENDIF INSERT INTO T VALUES (CSTRA,N) AA=CSTRA ENDFOR SELECT A,B,CAST(COUNT(*) AS N(2)) C FROM T GROUP BY 2,1 INTO CURSOR T1 CALCULATE MAX(C) TO CS N=0 CSTR=[] FOR I=1 TO CS SCAN CSTR=CSTR+IIF(C-N<=0,[ ],A)+IIF(RECNO([T1])=RECCOUNT([T1]),CHR(13)+CHR(10),[]) ENDSCAN N=N+1 ENDFOR ?CSTR经过反复考虑,找到了一种更为简单的方法