USE cj
CREATE CURSOR ls (xm c(8),cjj n(4))
SELECT 1
SCAN
FOR
i=3 TO 10
aa1=field(i)
aa2=&aa1
INSERT INTO
ls VALUES (aa1,aa2)
ENDFOR
SELECT * FROM ls ORDER BY cjj DESC INTO CURSOR lsa
SELECT lsa
GO 1
REPLACE 最优学科 WITH allt(lsa.xm)-':'+allt(STR(lsa.cjj)) IN 1
GO bott
REPLACE 最次学科 WITH allt(lsa.xm)-':'+allt(STR(lsa.cjj)) IN 1
tt=''
SCAN
tt=tt+IIF(LEN(tt)=0,'','*')+allt(lsa.xm)+' : '+allt(STR(lsa.cjj))
ENDSCAN
REPLACE 成绩排名 WITH tt IN 1
SELECT ls
zap
SELECT 1
ENDSCAN
CLOSE ALL