程序代码:
* VFP9 代码 SELECT PADL(RECNO(), 4, "0" ) Xh, zy2, wldj, hxdj, zzdj, lsdj, dldj, swdj, tydj, zbs, tzs FROM 录取资格库 INTO CURSOR tj READWRITE SCAN * 等级中是否包含 E cdj1 = ALLTRIM(wldj - hxdj - zzdj - lsdj - dldj - swdj - tydj) IF "E" $ cdj1 LOOP ENDIF * A学校指标生 STORE 0 TO ok1, ok2, ok3 && 如果为 1,表示符合条件 * 1 物理、化学,最低条件:BC cdjA_1 = ALLTRIM(wldj - hxdj) IF "D" $ cdjA_1 ELSE IF djpx(cdjA_1) <= "BC" ok1 = 1 ENDIF ENDIF * 2 思想品德、历史、地理、生物,最低条件:BCCC cdjA_2 = ALLTRIM(zzdj - lsdj - dldj - swdj) 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
ZBS、TZS 字段中的数据只是符合 A 学校的条件
[此贴子已经被作者于2019-6-19 21:40编辑过]
坚守VFP最后的阵地