use 分数登记表
sort on 总分 to tmp
use tmp
go bott
scat to t1
skip -1
scat to t2
skip -1
scat to t3
use 分数排名表
go 3
gath from t1
skip -1
gath from t2
skip -1
gath from t3
brow
SELECT * FROM 分数登记表 ; WHERE 总分=(SELECT MAX(总分) FROM 分数登记表) ; INTO ARRAY RANKING
UPDATE 分数排名表 SET 姓名=RANKING[1,1],总分=RANKING[1,2], ... WHERE RECNO('分数排名表')=3