回复 4楼 吹水佬
就下面这个程序,如果不用循环直接由set filter to xk=1 就可以
SET TALK OFF
SET SAFE OFF
&&排定市名次
for i=1 to 13
set filter to
xk=i
inde on left(kh,3)+str(1000-zcj,7,2)
tag shimingci
count all for
xk=i to qsrenshu
go top
qmingci=1
lsmc=1
linshizcj=zcj
wenli=subs(kh,3,1)
for i=1 to qsrenshu
repl qmc with qmingci
if not eof()
skip
endif
if wenli=subs(kh,3,1)
lsmc=lsmc+1
if
zcj<linshizcj
linshizcj=zcj
qmingci=lsmc
endif
else
qmingci=1
lsmc=1
linshizcj=zcj
wenli=subs(kh,3,1)
endif
endf
&&校名次
inde on left(kh,4)+str(1000-zcj,7,2)
tag xmingci
go top
xmingci=1
lsmc=1
linshizcj=zcj
xx=subs(kh,3,2)
for i=1 to qsrenshu
repl xmc with xmingci
if not eof()
skip
endif
if xx=subs(kh,3,2)
lsmc=lsmc+1
if
zcj<linshizcj
linshizcj=zcj
xmingci=lsmc
endif
else
xmingci=1
lsmc=1
linshizcj=zcj
xx=subs(kh,3,2)
endif
endf
&&班名次
inde on left(kh,6)+str(1000-zcj,7,2)
tag bmingci
go top
bmingci=1
lsmc=1
linshizcj=zcj
bbj=subs(kh,3,4)
for i=1 to qsrenshu
repl bmc with bmingci
if not eof()
skip
endif
if bbj=subs(kh,3,4)
lsmc=lsmc+1
if
zcj<linshizcj
linshizcj=zcj
bmingci=lsmc
endif
else
bmingci=1
lsmc=1
linshizcj=zcj
bbj=subs(kh,3,4)
endif
endf
set filt to
endf
set talk on
set safe on