大家都支持一下
谢谢楼主分享,看了一遍,有以下几个地方不明白:
IF FSJH = .T. AND XBJH = .T. AND ZXJH = .T.
K = 0
DO WHILE K <= NVZX
FOR J = BS TO 1 STEP -1
LOCATE FOR 性别 = '女' AND 住校 = '是' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
FOR J = 1 TO BS STEP 1
LOCATE FOR 性别 = '女' AND 住校 = '是' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
ENDDO
K = 0
DO WHILE K <= NANZX
FOR J = 1 TO BS STEP 1
LOCATE FOR 性别 = '男' AND 住校 = '是' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
FOR J = BS TO 1 STEP -1
LOCATE FOR 性别 = '男' AND 住校 = '是' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
ENDDO
K = 0
DO WHILE K <= ZNV - NVZX
FOR J = BS TO 1 STEP -1
LOCATE FOR 性别 = '女' AND 住校 = '否' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
FOR J = 1 TO BS STEP 1
LOCATE FOR 性别 = '女' AND 住校 = '否' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
ENDDO
K = 0
DO WHILE K <= ZNAN - NANZX
FOR J = 1 TO BS STEP 1
LOCATE FOR 性别 = '男' AND 住校 = '否' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
FOR J = BS TO 1 STEP -1
LOCATE FOR 性别 = '男' AND 住校 = '否' AND 班别 = 0
REPLACE 班别 WITH J
K = K + 1
ENDFOR
ENDDO
ENDIF
这样已分完了所有学生(男住+男不住+女住+女不住)为什么还要后面的 FSJH = .T. AND XBJH = .T. AND ZXJH = .F(按性别分班)与 FSJH = .T. AND XBJH = .F. AND ZXJH = .T.(按住校与否分班)
还有SELECT 8,SELECT 9,SELECT 10,SELEC T11不明白什么意思,查了一下说是数据库的,不明白是怎么回事?能解释一下吗?谢谢!