📄 2004fsd.prg
字号:
set talk off
clear all
close data
sele 1
gcT = GETFILE('dbf','文件名(N):', '打开',1)
DO CASE
CASE 'Untitled' $ gcT
CREATE (gcT)
CASE EMPTY(gcT)
modi comm (gcT)
RETURN
OTHERWISE
USE (gcT)
ENDCASE
sele 2
input"请输入字段个数:" to a
input"请输入各段分差:" to q
input"请输入最高起始分:" to d
input"请输入年份:" to pp
input"请输入考试的次数:" to ppp
acce"请输入单位标识字段名:" to e
sele 1
calc max(&e) to lll
calc min(&e) to ll
calc max(lb) to mmm
calc min(lb) to mm
acce"是否按类别进行统计(y/n):" to w
acce"请输入文件名:" to c
if w='y'
sele 2
crea table &c(&e n(4),lb n(2),参考数 n(4))
k=1
for k=1 to a
dd=d-q*(k-1)
s='f'+str(dd,3)+'以上'
alte tabl &c add &s n(4)
endfor
s='f'+str(dd,3)+'以下'
alte tabl &c add &s n(4)
m=mm
do while m<=mmm
sele 1
n=ll
do while n<=lll
sele 1
loca all for lb=m.and.&e=n
coun all for lb=m.and.&e=n.and.zf>0 to v
if v>0
select 2
append blank
go bott
repl &e with n lb with m
sele 1
k=1
do whil k<=a
dd=d-q*(k-1)
s='f'+str(dd,3)+'以上'
sele 1
coun all to h for lb=m.and.&e=n.and.zf>=dd
sele 2
repl &s with h 参考数 with v
k=k+1
enddo
sele 1
coun all for lb=m.and.&e=n.and.zf<(d-q*(a-1)).and.zf>0 to h
s='f'+str(dd,3)+'以下'
sele 2
repl &s with h
else
endif
n=n+1
enddo
m=m+1
enddo
m=mm
do while m<=mmm
sele 1
loca all for lb=m
coun all for lb=m to v
if v>0
select 2
append blank
go bott
repl &e with 5959 lb with m
sele 1
k=1
do whil k<=a
dd=d-q*(k-1)
s='f'+str(dd,3)+'以上'
sele 1
coun all to h for lb=m.and.zf>=dd
sele 2
repl &s with h 参考数 with v
k=k+1
enddo
sele 1
coun all to h for lb=m.and.zf<(d-q*(a-1)).and.zf>0
s='f'+str(dd,3)+'以下'
sele 2
repl &s with h
else
endif
m=m+1
enddo
sele 2
brow
cccc='盐城市'+str(pp,4)+'年第'+str(ppp,1)+'次调研考试分数段一览表'
copy to D:\&cccc xl5
else
sele 2
crea table &c(&e n(4),参考数 n(4))
k=1
for k=1 to a
dd=d-q*(k-1)
s='f'+str(dd,3)+'以上'
alte tabl &c add &s n(4)
endfor
s='f'+str(dd,3)+'以下'
alte tabl &c add &s n(4)
sele 1
n=ll
do while n<=lll
sele 1
loca all for &e=n
coun all for &e=n.and.zf>0 to v
if v>0
select 2
append blank
go bott
repl &e with n
sele 1
k=1
do whil k<=a
dd=d-q*(k-1)
s='f'+str(dd,3)+'以上'
sele 1
coun all to h for &e=n.and.zf>=dd
sele 2
repl &s with h 参考数 with v
k=k+1
enddo
sele 1
coun all to h for &e=n.and.zf<(d-q*(a-1)).and.zf>0
s='f'+str(dd,3)+'以下'
sele 2
repl &s with h
else
endif
n=n+1
enddo
sele 1
coun all to v for zf>0
select 2
append blank
go bott
repl &e with 5959
sele 1
k=1
do whil k<=a
dd=d-q*(k-1)
s='f'+str(dd,3)+'以上'
sele 1
coun all to h for zf>=dd
sele 2
repl &s with h 参考数 with v
k=k+1
enddo
sele 1
coun all to h for zf<(d-q*(a-1)).and.zf>0
s='f'+str(dd,3)+'以下'
sele 2
repl &s with h
brow
cccc='盐城市'+str(pp,4)+'年第'+str(ppp,1)+'次调研考试分数段一览表'
copy to D:\&cccc xl5
endif
retu
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -