10 REM	SPELLTST PROGRAM, VERSION 1.0
20 REM  WRITTEN BY AUSTIN ARDOIN
26 REM  MEMBER 1st FOG SV
30 REM  MAR. 4, 1983
40 REM  ON AN OSBORNE 1 COMPUTER
90 :
100 REM	VARIABLES USED*********************
110 :
120 REM	  F$ = FILE NAMES
130 REM   D$ = DEFINATIONS
135 REM   D1$= USER DEFINITION RESPONSE
140 REM   W$ = WORDS
145 REM   W1$= USER SPELLING RESPONSE
150 REM   Q$ = USER RESPONSE
155 REM   D  = USER RESPONSE FOR DEFINITION SELECTION
157 REM   F  = USER RESPONSE FOR DIFFERENT FILE
200 REM   I  = COUNTING VARIABLE
210 REM   N  = USER RESPONSE
212 REM   S  = USER RESPONSE FOR SPELLING SELECTION
215 REM   T  = COUNTING VARIABLES FOR EXTRA TRIALS
216 REM   W  = COUNTING VARIABLE FOR CORRECT SPELLINGS/DEFINITIONS
217 REM   X  = COUNTING VARIABLE
220 REM   Y  = USER RESPONSE
490 :
500 REM   PROGRAM INIALIZATION*************
510 :
515 DIM W$(100): DIM D$(100)
520 PRINT CHR$(26)
530 PRINT "DO YOU NEED INSTRUCTIONS (Y/N)?":Q$=INPUT$ (1)
540 IF Q$="N" OR Q$="n" THEN 1000
550 :
560 REM   INSTRUCTIONS*********************
570 :
575 PRINT CHR$(26)
577 PRINT "<CR> MEANS PRESS CARRIAGE RETURN."
579 PRINT
580 PRINT "WHEN REQUESTED, ENTER FILE NAME OF 8 CHARACTERS"
590 PRINT "MAXIMUM, AND AN EXTENSION OF 3 CHARACTERS"
600 PRINT "MAXIMUM."
610 PRINT
620 PRINT "WHEN REQUESTED, TYPE THE SPELLING WORD IN UPPER"
630 PRINT "OR LOWER CASE AS APPROPRIATE."
640 PRINT
650 PRINT "WHEN REQUESTED, TYPE THE DEFINATION. CHOOSE THE"
660 PRINT "DEFINITION YOU LIKE BEST IF THE WORD HAS MORE"
665 PRINT "THAN ONE."
690 PRINT
700 PRINT "WHEN ALL SPELLING WORDS AND DEFINITIONS HAVE"
710 PRINT "BEEN ENTERED, TYPE 'DONE' <CR> INSTEAD OF THE"
715 PRINT "NEXT SPELLING WORD."
720 PRINT
730 PRINT "OTHER INSTRUCTIONS WILL BE GIVEN AS THE PROGRAM"
740 PRINT "PROGRESSES."
750 PRINT
760 PRINT "PUSH RETURN TO CONTINUE.":Q$=INPUT$ (1)
960 :
970 REM   NEW WORD ENTRY ROUTINE************
980 :
1000 PRINT CHR$(26)
1005 PRINT "DO YOU WANT TO ENTER NEW SPELLING WORDS AND THEIR"
1010 PRINT "DEFINITIONS (Y/N)?";:Q$=INPUT$ (1)
1020 IF Q$="N" OR Q$="n" THEN 2500
1030 PRINT CHR$(26)
1080 PRINT "ENTER DISK DRIVE AND OUTPUT DISK FILE NAME LIKE"
1084 PRINT "THIS:"
1085 PRINT
1090 PRINT "       B:11-15-83.SPL : "
1095 PRINT
1100 LINE INPUT F$
1110 OPEN "O", #1, F$
1115 :
1150 :
1160 REM   ENTRY ROUTINE*******************
1170 :
1180 LET I=1
1200 PRINT CHR$(26)
1201 PRINT "ENTER WORD #";I;": ";:LINE INPUT W$(I)
1205 IF W$(I)="DONE" OR W$(I)="done" OR W$(I)="Done" THEN 2000
1210 PRINT CHR$(26)
1220 PRINT "ENTER DEFINITION OF ";W$(I);": "
1230 LINE INPUT D$(I)
1240 PRINT CHR$(26)
1250 PRINT "YOU TYPED WORD #";I;" AND DEFINITION LIKE THIS:"
1260 PRINT
1270 PRINT W$(I),D$(I)
1280 PRINT
1290 PRINT "ARE THEY CORRECT (Y/N)?":Q$=INPUT$ (1)
1300 IF Q$="N" OR Q$="n" THEN PRINT "THEN RE-";:GOTO 1201
1310 IF Q$="Y" OR Q$="y" THEN WRITE #1, W$(I), D$(I):GOTO 1315
1312 PRINT "PLEASE WE MUST HAVE A 'Y' OR A 'N'":GOTO 1290
1315 LET I=I+1
1320 GOTO 1200
2000 CLOSE #1
2010 PRINT CHR$(26)
2020 PRINT "ENTRIES COMPLETED"
2030 PRINT
2040 PRINT "DO YOU WANT TO ENTER WORDS AND DEFINITIONS IN"
2050 PRINT "ANOTHER FILE (Y/N)?":Q$=INPUT$ (1)
2060 IF Q$="Y" OR Q$="y" THEN 1030
2062 PRINT CHR$(26)
2063 PRINT "DO YOU WANT TO TAKE A SPELLING OR DEFINATION"
2064 PRINT "TEST?":Q$=INPUT$ (1)
2065 IF Q$="N" OR Q$="n" THEN 5100
2470 :
2480 REM   SPELLING/DEFINITION TEST ROUTINE***********
2490 :
2500 PRINT CHR$(26) 
2510 PRINT "ENTER DATA FILE TO READ WORDS AND DEFINITIONS"
2520 PRINT "FROM (LIKE THIS: B:12-22-83.SPL):"
2525 LINE INPUT F$
2530 OPEN "I",#1,F$
2535 LET I = 0
2536 PRINT CHR$(26)
2537 PRINT "READING IN DATA FROM ";F$;"."
2538 PRINT
2539 PRINT "PLEASE STAND BY."
2540 IF EOF (1) THEN 2600
2545 LET I = I+1
2550 INPUT #1, W$(I), D$(I)
2560 GOTO 2540
2600 PRINT CHR$(26)
2605 PRINT "FOR A SPELLING TEST PRESS S"
2610 PRINT "FOR A DEFINITION TEST PRESS D"
2620 Q$=INPUT$ (1)
2630 IF Q$="S" OR Q$="s" THEN 2700
2640 IF Q$="D" OR Q$="d" THEN 4000
2645 PRINT CHR$(26)
2650 PRINT "YOU PRESSED ";Q$:". PLEASE PRESS S OR D"
2660 GOTO 2600
2670 :
2680 REM SPELLING TEST*********************
2690 :
2700 PRINT CHR$(26)
2710 PRINT "ENTER THE WORDS FOR THE FOLLOWING DEFINATIONS."
2712 PRINT "THEY MUST BE EXACTLY AS CONTAINED IN DATA"
2714 PRINT "FILE ";F$;"."
2720 PRINT
2730 PRINT "PUSH RETURN TO START":Q$=INPUT$ (1)
2735 LET T=0:LET W=0
2740 FOR X=1 TO I
2750   PRINT CHR$(26)
2760   PRINT D$(X)
2770   LINE INPUT W1$
2780   IF W1$=W$(X) THEN GOTO 3000
2790   PRINT "WRONG. DO YOU WANT TO TRY AGAIN (Y/N)?":Q$=INPUT$ (1)
2800   IF Q$="Y" OR Q$="y" THEN LET T=T+1:GOTO 2750
2810 NEXT X
2820 PRINT CHR$(26)
2830 PRINT "NUMBER OF WORDS:             ";I
2840 PRINT "NUMBER OF CORRECT SPELLINGS: ";W
2850 PRINT "NUMBER OF SPELLING TRIALS:   ";I+T
2855 PRINT
2860 PRINT "TO REPEAT THE SPELLING TEST, PUSH S"
2865 PRINT
2870 PRINT "TO TAKE THE DEFINITION TEST, PUSH D"
2872 PRINT
2875 PRINT "TO TAKE A DIFFERENT SPELLING/DEFINITION TEST,"
2876 PRINT "PUSH F"
2877 PRINT
2880 PRINT "TO QUIT, PUSH RETURN"
2890 Q$=INPUT$ (1)
2900 IF Q$="S" OR Q$="s" THEN 2700
2910 IF Q$="D" OR Q$="d" THEN 4000
2915 IF Q$="F" OR Q$="f" THEN CLOSE #1:GOTO 2500
2920 GOTO 5100
3000 PRINT
3002 PRINT "CORRECT! PUSH RETURN FOR NEXT WORD":Q$=INPUT$ (1)
3005 LET W=W+1
3010 GOTO 2810
3970 :
3980 REM   DEFINITION TEST*****************
3990 :
4000 PRINT CHR$(26)
4010 PRINT "ENTER DEFINITIONS FOR THE FOLLOWING WORDS."
4012 PRINT "THEY MUST BE EXACTLY AS CONTAINED IN DATA"
4014 PRINT "FILE ";F$;"."
4020 PRINT
4030 PRINT "PUSH RETURN TO START":Q$=INPUT$ (1)
4035 LET T=0:LET W=0
4040 FOR X = 1 TO I
4050   PRINT CHR$(26)
4060   PRINT W$(X)
4070   LINE INPUT D1$
4080   IF D1$=D$(X) THEN 5000
4090   PRINT "WRONG! DO YOU WANT TO TRY AGAIN (Y/N)?":Q$=INPUT$ (1)
4100   IF Q$="Y" OR Q$="y" THEN LET T=T+1:GOTO 4050
4110 NEXT X
4120 PRINT CHR$(26)
4130 PRINT "NUMBER OF WORDS:               ";I
4135 PRINT "NUMBER OF CORRECT DEFINITIONS: ";W
4140 PRINT "NUMBER OF DEFINITION TRIALS:   ";I+T
4145 PRINT
4150 PRINT "TO REPEAT DEFINITON TEST, PUSH D"
4160 PRINT
4170 PRINT "TO TAKE THE SPELLING TEST, PUSH S"
4180 PRINT
4190 PRINT "TO TAKE A DIFFERENT SPELLING/DEFINITION TEST,"
4200 PRINT "PUSH F"
4205 PRINT
4210 PRINT "TO QUIT, PUSH RETURN"
4220 Q$=INPUT$ (1)
4230 IF Q$="S" OR Q$="s" THEN 2700
4240 IF Q$="D" OR Q$="d" THEN 4000
4250 IF Q$="F" OR Q$="f" THEN CLOSE #1:GOTO 2500
4260 GOTO 5100
5000 PRINT
5002 PRINT "CORRECT! PUSH RETURN FOR NEXT WORD":Q$=INPUT$ (1)
5005 LET W=W+1
5010 PRINT CHR$(26)
5015 GOTO 4110
5100 CLOSE #1
5110 PRINT CHR$(26);"END OF TEST"
5120 END
$=INPUT$ (1)
5005 LET W=W+1
5010 PRINT CHR$(26)
5015 GOTO