⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu1.mpr

📁 用VFP编写的学生成绩统计系统
💻 MPR
📖 第 1 页 / 共 2 页
字号:
	OTHERWISE
		USE (gcT)
ENDCASE
input"请输入字段个数:"  to a
input"请输入各段分差:"  to q
input"请输入最高起始分:"  to d
input"请输入年份:" to pp
input"请输入考试的次数:" to ppp
acce"请输入考试的名称:" to pppp
acce"请输入单位标识字段名:" to e
 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(5))
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)+pppp+'考试分数段一览表'
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)+pppp+'总分分数段一览表'
     copy to &cccc xl5
endif
retu



*       *********************************************************
*       *                                                         
*       * _1C011QCYH  ON SELECTION BAR 3 OF POPUP 成绩统计        
*       *                                                         
*       * Procedure Origin:                                       
*       *                                                         
*       * From Menu:  MENU1.MPR,            Record:   11          
*       * Called By:  ON SELECTION BAR 3 OF POPUP 成绩统计        
*       * Prompt:     均    分(按类别)                          
*       * Snippet:    5                                           
*       *                                                         
*       *********************************************************
*
PROCEDURE _1c011qcyh
set talk off
clea all
clos data
set safe off
on error do clea
set defa to E:\成绩跟综
dime d(16)
dime f(10),r(10)
dime jg(10),yl(10)
store 0 to r,x01,x02,x11,x12,x21,x22,x31,x32,x41,x42,x51,x52,x61,x62,x71,x72,x81,x82,x91,x92
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 pp
input"请输入考试的次数:" to ppp
acce"请输入字段个数:" to a
acce"请输入文件名:" to c
crea table &c(zxdm n(4),参考数 n(4),zf n(5,2),jg0 n(4,2),yl0 n(4,2),lb n(2))
a=val(a)
a=int(a)
k=1
for k=1 to a
s='cj'+str(k,1)
w='jg'+str(k,1)
y='yl'+str(k,1)
d='d'+str(k,1)
alte tabl &c add &s  n(5,2)
alte tabl &c add &w  n(4,2)
alte tabl &c add &y  n(4,2)
alte tabl &c add &d n(4)
endfor
sele 1
calc max(lb) to l
calc min(lb) to m
nn=m
do whil nn<=l
sele 1
n=5901
do while n<=5908
sele 1
loca all for zxdm=n.and.lb=nn
coun all to aa for zxdm=n.and.zf>0.and.lb=nn
coun all to bb for zxdm=n.and.lb=nn.and.zf>=(3/5)*750
coun all to cc for zxdm=n.and.lb=nn.and.zf>=(17/20)*750
aver zf for zxdm=n.and.lb=nn to mm
if aa>0
bb=(bb/aa)*100
cc=(cc/aa)*100
sele 2
appe blan
repl zxdm with n 参考数 with aa zf with mm jg0 with bb yl0 with cc lb with nn
else
endif
sele 1
      k=1
      do whil k<=9
      sele 1
      loca all for zxdm=n
      s='cj'+str(k,1)
      w='jg'+str(k,1)
y='yl'+str(k,1)
d='d'+str(k,1)
      sele 1
      loca all for &s>=1
      coun all to dd for zxdm=n.and.lb=nn.and.&s>0
      count all to a1 for &s>=((3/5)*150).and.zxdm=n.and.lb=nn
      count all to a2 for &s>=((17/20)*150).and.zxdm=n.and.lb=nn
      if dd>0
      jg=(a1/dd)*100
      yl=(a2/dd)*100
      aver &s for zxdm=n.and.&s>0.and.lb=nn to f
      else
      jg=0
      yl=0
      f=0
      endif
      sele 2
      repl &d with dd  &s with f  &w with jg  &y with yl
     k=k+1
      enddo
n=n+1
enddo
sele 1
coun all to aa for zf>0.and.lb=nn
coun all to bb for zf>=(3/5)*750.and.lb=nn
coun all to cc for zf>=(17/20)*750.and.lb=nn
aver zf to mm for zf>0.and.lb=nn
if aa>0
bb=(bb/aa)*100
cc=(cc/aa)*100
else
bb=0
cc=0
endif
sele 2
appe blan
repl zxdm with 5959 参考数 with aa zf with mm jg0 with bb yl0 with cc lb with nn
sele 1
      k=1
      do whil k<=9
      sele 1
      s='cj'+str(k,1)
      w='jg'+str(k,1)
      y='yl'+str(k,1)
      d='d'+str(k,1)
      loca all for &s>=1.and.lb=nn
      coun all to dd for &s>=1.and.lb=nn
      count all to a1 for &s>=((3/5)*150).and.lb=nn
      count all to a2 for &s>=((17/20)*150).and.lb=nn
      if dd>0
      jg=(a1/dd)*100
      yl=(a2/dd)*100
      aver &s for &s>0 to f
     else
     jg=0
     yl=0
     endif
      sele 2
      repl &d with dd  &s with f  &w with jg  &y with yl
      k=k+1
      enddo
else
endif
nn=nn+1
enddo
sele 1
coun all to aa for zf>0
coun all to bb for zf>=(3/5)*750
coun all to cc for zf>=(17/20)*750
aver zf to mm for zf>0
bb=(bb/aa)*100
cc=(cc/aa)*100
sele 2
appe blan
repl zxdm with 5959 参考数 with aa zf with mm jg0 with bb yl0 with cc
sele 1
      k=1
      do whil k<=9
      sele 1
      s='cj'+str(k,1)
      w='jg'+str(k,1)
      y='yl'+str(k,1)
      d='d'+str(k,1)
      loca all for &s>=1
      coun all to dd for &s>=1
      count all to a1 for &s>=((3/5)*150)
      count all to a2 for &s>=((17/20)*150)
      jg=(a1/dd)*100
      yl=(a2/dd)*100
      aver &s for &s>0 to f
      sele 2
      repl &d with dd  &s with f  &w with jg  &y with yl
     k=k+1
      enddo
     select 2
      cccc='盐城市'+str(pp,4)+'年第'+str(ppp,1)+'次调研考试各科成绩一览表'
     copy to &cccc xl5
    brow
    retu


*       *********************************************************
*       *                                                         
*       * _1C011QCYI  ON SELECTION BAR 1 OF POPUP 帮助            
*       *                                                         
*       * Procedure Origin:                                       
*       *                                                         
*       * From Menu:  MENU1.MPR,            Record:   16          
*       * Called By:  ON SELECTION BAR 1 OF POPUP 帮助            
*       * Prompt:     请先读我                                    
*       * Snippet:    6                                           
*       *                                                         
*       *********************************************************
*
PROCEDURE _1c011qcyi
do readme

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -