中学生德育量化考核表:VF程序填空

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 01:50:10
设当前数据表st.dbf有以下记录:

record 姓名(C8 性别(C2) 语文 数学 英语 综合 总分(N6,2)名次(N/2)录取(L)
1 王五 男 100 95 105 235 .F.
2 李四 女 105 90 115 205 .F.
3 张三 男 65 60 85 195 .F.
4 赵六 女 110 130 104 255 .F.
5 孙九 女 90 105 80 215 .F.
use st
repl all 总分 with 语文+数学+英语+综合
index on 性别+str(1000-总分,6,2) tag cc
xb=性别
n=1
do while not eof()
if
xb=性别
n=1

endif
replace 名次 with n
n=n+1

enddo
close all
set talk on
return
use st
repl all 总分 with 语文+数学+英语+综合
index on 性别+str(1000-总分,6,2) tag cc
xb=性别
n=1
do while not eof()
if ______
xb=性别
n=1
____________
endif
replace 名次 with n
n=n+1
_________
enddo
close all
set talk on
return

性别<>xb
else
skip

use st
repl all 总分 with 语文+数学+英语+综合
index on 性别+str(1000-总分,6,2) tag cc
xb=性别
n=1
do while not eof()
if 性别<>xb
xb=性别
n=1
else
endif
replace 名次 with n
n=n+1
skip
enddo
close all
set talk on
return
该题主要考察男女分组排名,但不完善,不能解决分数相同时名次的排列.