程序代码:
SELECT 0 USE pyk n = AFIELDS(arr) SELECT 0 CREATE CURSOR pytj (ygxm C(10),很满意 I, 满意 I, 不满意 I) APPEND FROM ARRAY arr FIELDS ygxm INDEX on ALLTRIM(ygxm) TAG yg SELECT pyk SCAN FOR i=1 TO n py = ALLTRIM(EVALUATE(arr[i,1])) IF INLIST(py, "很满意","满意","不满意") =SEEK(arr[i,1], "pytj") cf = "pytj." + py REPLACE (cf) WITH EVALUATE(cf)+1 IN "pytj" ENDIF ENDFOR ENDSCAN SELECT * FROM pytj