程序代码:
* VFP9 代码 SELECT PADL(RECNO(), 4, "0" ) Xh, zy2, zy3, wldj, hxdj, zzdj, lsdj, dldj, swdj, tydj, SPACE(2) 理化, SPACE(4) 政史地生, SPACE(6) 六科, SPACE(7) 七科, zbs, tzs FROM 录取资格库 INTO CURSOR tj READWRITE SCAN * 等级中是否包含 E cdj1 = ALLTRIM(wldj - hxdj - zzdj - lsdj - dldj - swdj - tydj) IF "E" $ cdj1 LOOP ENDIF REPLACE 七科 WITH djpx(ALLTRIM(wldj - hxdj - zzdj - lsdj - dldj - swdj - tydj)) REPLACE 六科 WITH djpx(ALLTRIM(wldj - hxdj - zzdj - lsdj - dldj - swdj)) * A学校指标生 STORE 0 TO ok1, ok2, ok3 && 如果为 1,表示符合条件 * 1 物理、化学,最低条件:BC cdjA_1 = ALLTRIM(wldj - hxdj) REPLACE 理化 WITH djpx(cdjA_1) IF "D" $ cdjA_1 ELSE IF djpx(cdjA_1) <= "BC" ok1 = 1 ENDIF ENDIF * 2 思想品德、历史、地理、生物,最低条件:BCCC cdjA_2 = ALLTRIM(zzdj - lsdj - dldj - swdj) REPLACE 政史地生 WITH djpx(cdjA_2) IF "D" $ cdjA_2 ELSE IF djpx(cdjA_2) <= "BCCC" ok2 = 1 ENDIF ENDIF ok3 = 1 IF ok1 = 1 AND ok2 = 1 AND ok3 = 1 REPLACE zbs WITH "31" ENDIF * A学校统招生 cdjA_3 = ALLTRIM(wldj - hxdj - zzdj - lsdj - dldj - swdj) IF djpx(cdjA_3) <= "BBCCDD" REPLACE tzs WITH "31" ENDIF ENDSCAN GO TOP BROWSE RETURN * * 等级排序 * FUNCTION djpx(cStr) LOCAL px[LEN(cStr)] FOR i = 1 TO LEN(cStr) px[i] = SUBSTR(cStr, i, 1) ENDFOR =ASORT(px) cStr1 = "" FOR i = 1 TO ALEN(px,1) cStr1 = cStr1 + px[i] ENDFOR RETURN cStr1
结果
坚守VFP最后的阵地