回复 30楼 fdqzy
逻辑运算
GO 10 SCAN REST p11 = a1 qs = jnh SELECT COUNT(*) FROM t1 WHERE BETWEEN(jnh,qs-9,qs) AND (a1=p11 OR a2=p11) INTO ARRAY tj REPLACE s1_3 WITH IIF(tj>0 AND tj<=3, 'S1_3', ''), s4 WITH IIF(tj>3, 'S4', '') ENDSCAN
USE b1 BLANK FIELDS s1_3,s4 all GO TOP DIMENSION a12[10,2] COPY TO ARRAY a12 FIELDS a1,a2 NEXT 9 SKIP SCAN REST p11 = a1 a12[10,1] = a1 a12[10,2] = a2 tj = 1 FOR i=1 TO 9 IF a12[i,1]=p11 OR a12[i,2]=p11 tj = tj + 1 ENDIF ENDFOR REPLACE s1_3 WITH IIF(tj<4, 'S1_3', ''), s4 WITH IIF(tj>3, 'S4', '') ADEL(a12,1) ENDSCAN SELECT * FROM b1
[此贴子已经被作者于2020-9-15 16:22编辑过]