求助字符串问
1,假如有一个字符串"355644" 字符的位数没有定有多有少 把重复的去掉并按升序排列 用什么函数2,数字号码为0--9 现在有字符串数字"4563" 求另外的6个数字并按升序排列 怎么弄呀
CLEAR CSTR1=[355644] CSTR=[] FOR I=1 TO LEN(CSTR1) IF !SUBSTR(CSTR1,I,1)$CSTR &&过滤重复字符 CSTR=CSTR+SUBSTR(CSTR1,I,1)+[,] ENDIF ENDFOR CSTR=LEFT(CSTR,LEN(CSTR)-1) =ALINES(A,CSTR,[,]) =ASORT(A) CSTR=[] FOR I=1 TO ALEN(A) CSTR=CSTR+A(I) ENDFOR ?CSTR
*问题2 CLEAR CREATE CURSOR t1 (bh c(1)) FOR I=0 TO 9 INSERT INTO T1 VALUES (TRANSFORM(I)) ENDFOR CREATE CURSOR t2 (bh c(1)) CSTR=[4563] FOR I=1 TO LEN(CSTR) INSERT INTO T2 VALUES (SUBSTR(CSTR,I,1)) ENDFOR SELECT A.BH,B.BH BH1 FROM T1 A FULL JOIN T2 B ON B.BH==A.BH ORDER BY A.BH INTO CURSOR T3 SELECT T3 CSTR=[] SCAN FOR ISNULL(BH1) CSTR=CSTR+BH ENDSCAN ?CSTR