介绍一个录入水平测试程序
1 PRINT"这是一个考查录入水平的程序"
2 PRINT"它能自动统计录入的字数和"
3 PRINT"敲错键的键数及敲键的准确率"
4 PRINT
6 PRINT "1)测试三分钟2)测试五分钟"
7 PRINT " "
8 PRINT "3)测试十分钟SPACE 4)用丨计时"
9 PRINT " "
10 PRINT "5)退出测试":PRINT
11INPUT"请选择......";G
12 IF G< 1 O R G> 5 THEN 0
14 O N G GO TO 18,20,22,23
16 END
18 T$ = "00:03:00":GO TO 100
20 T$ = "00:05:00":GO TO 100
22 T$ = "00:10:00"
23 T$ = "10:00:00":GO TO 100
24 PRINT" "
100 PRINT " "
110 INPUT"请输入被测试的文件名:";F$ :
M= 0:K= 0
120 O PEN F$ FO R INPUT AS# 1
122 A$ = "00:00:00"
124 TIME$ = A$
125 PRINT" "
130 LINE INPUT # 1,A$
134 IF TIME$ > = T$ O R EO F(1) THEN CLO SE # 1:GO TO 1300
140 N= LEN(A$ )
145 PRINT A$
150 FOR X= 1 TO N
160 B$ = MID$ (A$ ,X,I)
170 C$ = INKEY$
175 IF TIME $ > = TY O R C$ = "丨" THEN CLO SE # 1:GO TO 1300
180 IF C$ = " " THEN 170
181 IF B$ < > C$ THEN M= M+1: BEEP:GO TO 17
185 PRINT C$ ;
190 K= K+ 1
1100 NEXT X
1102 PRINT
1103 PRINT
1105 GO TO 130
1110 PRINT
1300 PRINT
1301 PRINT "时间= ";THE$
1305 PRINT"共录字数= ";K
1310 PRINT"共改次数= ";M
1315 PRINT "正确率= ";K/ (K+ M)
1320 PRINT " "
1330 INPUT"重新测试请按回车键";P$
1340 IF P$ = " "THEN 0
1350 END
程序中110 语句执行时,屏幕显示:请输入被测 试的文件名,这时录入员可将被测试的文件名由键 盘输入。不过这被测试的文件应是文本文件且要事 先输入微机存盘。
测试过程中,若录入有错,微机则会报鸣。这时 需看屏幕,再录入正确的字符。测试时间到,屏幕会 自动显示测试结果。在录入过程中若想终止,可按键 “丨”,则也可显示测试结果.
(湖北 魏天申)