程序代码:
* VFP9 代码 CLOSE DATABASES SELECT * FROM DBF\aa ORDER BY bkzydm, zf DESC INTO CURSOR temp READWRITE BLANK FIELDS pm, bl ALL lczydm = SPACE(0) lnzf = 0 lnzrs = 0 SCAN lnzrs = lnzrs + 1 IF bkzydm == lczydm IF zf != lnzf lnmc = lnzrs lntf = 1 ELSE lntf = lntf + 1 ENDIF ELSE lnmc = 1 lnzrs = 1 lntf = 1 ENDIF REPLACE pm WITH lnmc, bl WITH lntf lczydm = bkzydm lnzf = zf lnmc = pm ENDSCAN BROWSE