【正文】
se 學(xué)生成績(jī) calculate avg(平時(shí)成績(jī) ),avg(考試成績(jī) ),avg(最終成績(jī) ) to f,g,h ?全班學(xué)生的平時(shí)成績(jī)平均分?jǐn)?shù)為: ,f ? ?全 班學(xué)生的考試成績(jī)平均分?jǐn)?shù)為: ,g ? ?全班學(xué)生的平均分?jǐn)?shù)為: ,h ? *平均離差 i=h60 ?全班學(xué)生的平均離差為: ,i ? *標(biāo)準(zhǔn)差 j=a+b+c+d+e store 0 to x,y go top for k=1 to j x=最終成績(jī) h y=y+x*x skip endfor z=y/j l=sqrt(z) ?全班學(xué)生的標(biāo)準(zhǔn)差為: ,l ? *極差 store 0 to s store 100 to t go top for m=1 to j if s最終成績(jī) s=最終成績(jī) endif skip endfor go top for m=1 to j if t最終成績(jī) t=最終成績(jī) endif skip endfor n=st ?全班學(xué)生的極差為: ,n ? *合格率 o=a+b+c+d p=o/j ?全班學(xué)生的合格率為: ,p*100,% use 相關(guān)數(shù)據(jù)統(tǒng)計(jì) replace 平均分?jǐn)?shù) with h replace 平均離差 with i replace 標(biāo)準(zhǔn)差 with l replace 極差 with n replace 合格率 with p 此過程命令完成后會(huì)在屏幕上顯示相關(guān)內(nèi)容,另外還會(huì)把顯示的數(shù)據(jù)輸入到相關(guān)成績(jī)統(tǒng)計(jì) .DBF 和 分?jǐn)?shù)段人數(shù) .DBF 兩個(gè)表中 ,用于 和以后的打印報(bào)表相關(guān)聯(lián),輸出數(shù)據(jù)。 其中從按成績(jī)高到低排序的過程代碼是: clear use 學(xué)生成績(jī) sort to 從高到低成績(jī)排序 on 最終成績(jī) /D fields 學(xué)號(hào) ,姓名 ,平時(shí)成績(jī) ,考試 成績(jī) ,最終成績(jī) use 從高到低成績(jī)排序 list r=recc(select()) dimension shuzu(r,5) copy to array shuzu fields 學(xué)號(hào) ,姓名 ,平時(shí)成績(jī) ,考試成績(jī) ,最終成績(jī) use 成績(jī)從高到低排序 delet all pack append from array shuzu close all 從按成績(jī)低到高排序的過程代碼是: clear use 學(xué)生成績(jī) sort to 從低到高成績(jī)排序 on 最終成績(jī) fields 學(xué)號(hào) ,姓名 ,平時(shí)成績(jī) ,考試成績(jī) ,最終成績(jī) use 從低到高成績(jī)排序 list r=recc(select()) dimension shuzu(r,5) copy to array shuzu fields 學(xué)號(hào) ,姓名 ,平時(shí)成績(jī) ,考試成績(jī) ,最終成績(jī) use 成績(jī)從高到低排序 delet all pack append from array shuzu close all 這兩個(gè)過程命令執(zhí)行完成后,會(huì)生成 從低到高成績(jī)排序 .DBF 和從高到低 成績(jī)排序 .DBF倆個(gè)表,然后分別傳遞到 成績(jī)從高到低排序 .DBF 和成績(jī)從低到高 排序 .DBF,因?yàn)榍?兩個(gè)表是自己生成,在每次顯示時(shí)都會(huì)先刪除在生成,所以學(xué)要另外兩個(gè)表用于存放,這就要設(shè)臨時(shí)變量,然后把后兩個(gè)表與打印報(bào)表相關(guān)聯(lián), 用于輸出數(shù)據(jù)。用于顯示各自需要打印的報(bào)表。 “ report form 成績(jī)排序 表 ”顯示結(jié)果如下圖: 此報(bào)表的數(shù)據(jù)環(huán)境中添加了成績(jī)從高到低排序表,用報(bào)表控件控制欄填入個(gè)空的相關(guān)信息,用于帶入數(shù)據(jù),輸出打印。 運(yùn)行設(shè)計(jì) 一、裝載數(shù)據(jù) 在應(yīng)用系統(tǒng)連編運(yùn)行之前,要先在數(shù)據(jù)庫中裝如必要的或已有的成批數(shù)據(jù)。