home *** CD-ROM | disk | FTP | other *** search
AmigaBASIC Source Code | 1987-04-02 | 10.8 KB | 470 lines |
-
-
- CLS
-
- GOTO MainMenu
-
- Parents:
- CLS
-
- PRINT
- PRINT
- PRINT " This Spelling Program Allows The User To Enter The Words They"
- PRINT " Want Their Child To Practice. This Allows For Difficulty Levels"
- PRINT " Which Are Defined By The Parents, Thus Making This Program Usable"
- PRINT " For Children Of All Grade Levels."
- PRINT
- PRINT " You Are Able To Create 3 Differant Levels That Are Saved For Future"
- PRINT " Use On Disk. The Words In Each Level Can Be Changed At Any Time."
- PRINT
- COLOR 3:PRINT " - Press Any Key To Continue -"
- GOSUB GetAKey
- COLOR 1
- CLS
- PRINT
- A$ = " Here is a sample of my voice"
- PRINT A$;" ..."
- SAY TRANSLATE$ (A$)
- SAY TRANSLATE$ ("It Sometimes Sounds Rather ODD.")
- SAY TRANSLATE$ ("Sorry, but no 1 is perfect")
-
- PRINT
- PRINT " Sometimes I sound rather odd. To help get around that little problem,"
- PRINT " I have added the ability to enter both the correct spelling of a word"
- PRINT " and the PHONETIC spelling of a word. You may have to play around with"
- PRINT " a word to get it to sound like it should."
- PRINT
- PRINT " The Main Menu has an option called PHONETIC CHECK. You can select"
- PRINT " this option to play with phonetic spellings. Spell-It will say the"
- PRINT " word as you have it entered. Make note of the PHONETIC way that sounds"
- PRINT " best, you will need it when you actually enter the words to be used"
- PRINT " in a spelling test."
- PRINT
-
- PRINT " When entering the words for the spelling test, you will receive two"
- PRINT " prompts for each word. The first is where you will enter the CORRECT"
- PRINT " spelling of the word. The next prompt will ask you for the PHONETIC"
- PRINT " spelling. If you do not wish to use PHONETIC spellings for sound"
- PRINT " purposes, then press RETURN at the PHONETIC prompt.
- PRINT
- PRINT
- COLOR 3:PRINT " - Press Any Key To Continue -"
- GOSUB GetAKey
- COLOR 1
- CLS
- PRINT
- PRINT
- PRINT " This is version 1.0 of Spell-It, so hang in there ... perfection"
- PRINT " has not yet been reached. Spell-It was created because Educational"
- PRINT " Software for the Amiga seems to be lacking. Spell-It is an attempt"
- PRINT " to bring educational software to Amiga owners at an affordable"
- PRINT " price. You have to admit, this is as affordable as you can get."
- PRINT
- PRINT " Spell-It is the COPYRIGHTED matarial of RB-Data Systems."
- PRINT " This individual program may be copied and freely distributed "
- PRINT
- COLOR 3
- PRINT " PROVIDED NO FEE IS CHARGED"
- COLOR 1
- PRINT
- PRINT " This includes being part of any disk which is sold that may"
- PRINT " include other programs."
- PRINT
- COLOR 3
- PRINT " Version 1.0 has been specially licensed to Digital Publishing"
- PRINT " for publication in the December 1986 issue of AMIGAZINE!"
- PRINT " Digital Publishing, P.O. Box 9231, Bakersfield, CA 93389."
- PRINT
- COLOR 3:PRINT " - Press Any Key To Continue -"
- GOSUB GetAKey
- COLOR 1
- CLS
-
- MainMenu:
- CLEAR
- ON ERROR GOTO ErrorTrap
- CLS
- LOCATE 1,55
- COLOR 3
- PRINT "Spell-It v1.0 (c) 1986"
- LOCATE 2,55
- PRINT " RB-Data Systems"
- PRINT
- PRINT
- LOCATE 6,35
- COLOR 1
- PRINT "Spell-It Menu"
- COLOR 3
- LOCATE 7,34
- PRINT "==============="
- LOCATE 9,28
- COLOR 3
- PRINT "(1)";:COLOR 1:PRINT " Spelling Test Level 1"
- LOCATE 10,28
- COLOR 3
- PRINT "(2)";:COLOR 1:PRINT " Spelling Test Level 2"
- LOCATE 11,28
- COLOR 3
- PRINT "(3)";:COLOR 1:PRINT " Spelling Test Level 3"
- LOCATE 12,28
- COLOR 3
- PRINT "(4)";:COLOR 1:PRINT " Enter Words For Tests"
- LOCATE 13,28
- COLOR 3
- PRINT "(5)";:COLOR 1:PRINT " Instructions For Parents"
- LOCATE 14,28
- COLOR 3
- PRINT "(6)";:COLOR 1:PRINT " PHONETIC CHECK"
- LOCATE 15,28
- COLOR 3
- PRINT "(7)";:COLOR 1:PRINT " Exit Program"
-
- AnswerMenu:
-
- GOSUB GetAKey
- A = VAL(A$)
- IF A < 1 OR A > 7 THEN GOTO AnswerMenu
- IF A = 4 THEN GOTO LevelMenu
- IF A = 5 THEN GOTO Parents
- IF A = 6 THEN GOTO Phonetic
- IF A = 7 THEN CLS:END
- GOTO SpellingTest
-
-
-
-
- LevelMenu:
- CLS
- LOCATE 5,27
- PRINT "Enter Words For Which Level?"
- LOCATE 6,27
- PRINT " ('E' To Exit)"
-
- LOCATE 10,30
- COLOR 3
- PRINT "(1) ";
- COLOR 1
- PRINT "Level One"
- LOCATE 12,30
- COLOR 3
- PRINT "(2) ";
- COLOR 1
- PRINT "Level Two"
- LOCATE 14,30
- COLOR 3
- PRINT "(3) ";
- COLOR 1
- PRINT "Level Three"
-
- GetResponse:
-
- GOSUB GetAKey
-
- IF A$ = "E" THEN GOTO MainMenu
- A = VAL(A$)
- IF A <1 OR A > 3 THEN GOTO GetResponse
-
- CLS
-
- PRINT
- PRINT " The Number Of Words Entered At Each Level Is Determined By You. When"
- PRINT " You Have Entered ALL The Words You Want For This Level, Type The Word"
- PRINT
- COLOR 3
- PRINT " QUIT "
- COLOR 1
- PRINT
- PRINT " This Will Bring You Back To The Level Selection Menu."
- PRINT
- PRINT " You can enter single words, or short sentences."
- PRINT
- PRINT
-
- DataName$ = "Level"+A$+".Dat"
- OPEN "O", #1, DataName$
- Count% = 0
- DIM Word$(100)
- DIM PWord$(100)
- EnterData:
-
- Count% = Count% + 1
- COLOR 3
- PRINT "Word #";Count%;":";
- COLOR 1
- INPUT " ",Word$
- Word$ = UCASE$(Word$)
-
- IF Word$ = "QUIT" THEN GOTO FinishWords
- INPUT "Phonetic Spelling ";PWord$
- IF PWord$ = "" THEN PWord$ = "*"
- PRINT
- Word$(Count%) = Word$
- Word$ = ""
- PWord$(Count%) = PWord$
- PWord$ = ""
-
- GOTO EnterData
-
- FinishWords:
-
- PRINT #1, Count%-1
-
- FOR I = 1 TO Count%-1
- PRINT #1, Word$(I)
- PRINT #1, PWord$(I)
- NEXT I
-
- CLOSE 1
- GOTO MainMenu
-
-
- SpellingTest:
- Count% = 0
- CLS
- DataName$ = "Level"+A$+".dat"
- OPEN "I", #1, DataName$
- INPUT #1, NumberOfWords
-
- DIM Wrong$(NumberOfWords)
- DIM WrongSpelling$(NumberOfWords)
- PRINT
- Sentence$ = "I will say a word then u spell it"
-
- SAY TRANSLATE$ (Sentence$)
- SAY TRANSLATE$ ("The First Word IS")
-
- WHILE NOT EOF(1)
- Count% = Count% + 1
- IF Count% > 1 THEN SAY TRANSLATE$ ("The Next Word IS")
-
- INPUT #1, Word$
- INPUT #1, PWord$
-
-
- SayWord:
- IF PWord$ = "*" THEN SAY TRANSLATE$ (Word$) :ELSE SAY TRANSLATE$ (PWord$)
-
- INPUT " ",Answer$
- Answer$ = UCASE$(Answer$)
- IF Answer$ = Word$ THEN GOSUB RightAnswer :ELSE GOSUB WrongAnswer
-
- WEND
- CLOSE 1
-
- SAY TRANSLATE$ ("That Is All The Words In This Level")
- GOTO FinishedLevel
-
-
- RightAnswer:
- RightAnswer% = RightAnswer% + 1
- PRINT
- RETURN
-
- WrongAnswer:
- WrongAnswer% = WrongAnswer% + 1
- Wrong$(WrongAnswer%) = Word$
- WrongSpelling$(WrongAnswer%) = Answer$
- COLOR 3
- PRINT " ";
- SAY TRANSLATE$ ("Sorry")
- SAY TRANSLATE$ ("You Spelled it wrong")
- SAY TRANSLATE$ ("The correct spelling is")
- FOR Correct% = 1 TO LEN(Word$)
- Correct$ = MID$(Word$,Correct%,1)
- GOSUB PronounceLetters
- SAY TRANSLATE$ (Pronounce$)
- PRINT Correct$;
- NEXT Correct%
- PRINT
-
- SAY TRANSLATE$ ("Better Luck Next Time")
- COLOR 1
- PRINT
-
- RETURN
-
- FinishedLevel:
-
- CLS
- PRINT
-
- Total% = RightAnswer% + WrongAnswer%
- Total$ = STR$ (Total%)
- RightAnswer$ = STR$(RightAnswer%)
- WrongAnswer$ = STR$(WrongAnswer%)
-
- A$ = " There were"+Total$+" words in this test.
- SAY TRANSLATE$ (A$)
- PRINT A$
-
- A$ = " You Spelled"+RightAnswer$+ " correctly, and"+WrongAnswer$+ " wrong."
- SAY TRANSLATE$ (A$)
- PRINT A$
- PRINT
-
- IF WrongAnswer% = 0 THEN GOTO ContinueToMainMenu
-
- A$ = " Press P to print the words you spelled wrong on your printer"
- SAY TRANSLATE$ (A$)
- PRINT " Press ";
- COLOR 3
- PRINT "P ";
- COLOR 1
- PRINT "to Print the words you spelled wrong on you printer."
-
- A$ = " Press S to see the words on your screen"
- SAY TRANSLATE$ (A$)
- PRINT " Press ";
- COLOR 3
- PRINT "S ";
- COLOR 1
- PRINT "to see the words on your screen."
- ContinueToMainMenu:
- PRINT
- A$ = " Press Any Key To Continue"
- PRINT A$
- SAY TRANSLATE$ (A$)
- GOSUB GetAKey
-
- IF A$ = "P" THEN GOTO PrintWords
- IF A$ = "S" THEN GOTO SeeWords
-
- GOTO MainMenu
-
- PrintWords:
- CLS
- FOR I = 1 TO WrongAnswer%
- LPRINT " THE WORD WAS: ";Wrong$(I);" YOU SPELLED IT: ";WrongSpelling$(I)
- PRINT " The word was : ";:COLOR 3:PRINT Wrong$(I);:COLOR 1:PRINT " YOU SPELLED IT: ";:COLOR 3:PRINT WrongSpelling$(I)
- COLOR 1
- NEXT I
-
- COLOR 3
-
- PRINT
- PRINT " Any Key To Go To The Main Menu"
- GOSUB GetAKey
-
- GOTO MainMenu
-
- SeeWords:
- CLS
- FOR I = 1 TO WrongAnswer%
- COLOR 1
- PRINT " The word was: ";:COLOR 3:PRINT Wrong$(I);:COLOR 1:PRINT " You Spelled it: ";:COLOR 3:PRINT WrongSpelling$(I)
- NEXT I
-
- COLOR 3
-
- PRINT
- PRINT " Any Key To Go To The Main Menu"
- GOSUB GetAKey
-
- GOTO MainMenu
-
- ErrorTrap:
- IF ERR = 5 THEN CLS:LOCATE 10,10:COLOR 3:PRINT "Narrator.Device has been removed from the Work Bench Disk."
- IF ERR = 5 THEN LOCATE 11,10:COLOR 3:PRINT "It must be replaced prior to Spell-It being able to properly run.":GOSUB GetAKey:GOTO MainMenu
- IF ERR = 53 THEN LOCATE 10,10:COLOR 3:PRINT "Sorry, but there has been no words entered for that level.":COLOR 1
- IF ERR = 53 THEN SAY TRANSLATE$ ("Sorry but there has been no words entered for that level"):CLOSE 1:CLOSE 2:GOTO MainMenu
- IF ERR = 55 THEN SAY TRANSLATE$ ("ERROR, File Already Open. Returning to main menu, closing all files.")
- IF ERR = 55 THEN CLOSE 1:CLOSE 2:GOTO MainMenu
- CLS
- COLOR 3
- PRINT " * AN UNTRAPPED ERROR HAS OCCURED *"
- PRINT " ERROR NUMBER IS:";ERR
- PRINT " * ANY KEY TO RETURN TO MAIN MENU *"
-
- GOSUB GetAKey
- GOTO MainMenu
-
- Phonetic:
-
- CLS
- COLOR 3
- PRINT
- PRINT " PHONETIC CHECK"
- PRINT " =============="
- PRINT
- COLOR 1
- PRINT " Enter a word at the prompt and press RETURN. Spell-It will then"
- PRINT " say that word. If it doesn't sound right, then try it again making"
- PRINT " a few changes in the spelling. The ODD spelling will later be used"
- PRINT " to help Spell-It pronounce the word so your child will better"
- PRINT " recognize it. After all, you can't expect the little one to spell"
- PRINT " a word he or she can't understand."
- PRINT
-
- PRINT " Type the word QUIT to exit to the main menu.
- PRINT
- PRINT
- PRINT"================================================================================="
-
- PRINT
- PRINT
- PRINT
-
- x = 18: y =10
- t = 0
-
- StartPhonetic:
-
- COLOR 3
- LOCATE x,y
- PRINT " >";:INPUT" ",Word$
- Word$ = UCASE$(Word$)
- IF Word$ = "QUIT" THEN GOTO MainMenu
-
- SAY TRANSLATE$ (Word$)
- x = x +1:t = t + 1
- IF t = 4 THEN y = 30:x = 18
- IF t = 8 THEN y = 50:x = 18
- IF t = 12 GOTO Phonetic
- GOTO StartPhonetic
-
-
- PronounceLetters:
-
-
- IF Correct$ = "A" THEN Pronounce$ = "AY,":RETURN
- IF Correct$ = "B" THEN Pronounce$ = "BEEEEEE":RETURN
- IF Correct$ = "C" THEN Pronounce$ = "CEEEEEE":RETURN
- IF Correct$ = "D" THEN Pronounce$ = "DEEEEEE":RETURN
- IF Correct$ = "E" THEN Pronounce$ = "EEEEEEE":RETURN
- IF Correct$ = "F" THEN Pronounce$ = "F":RETURN
- IF Correct$ = "G" THEN Pronounce$ = "GEEEEEE":RETURN
- IF Correct$ = "H" THEN Pronounce$ = "AYCH":RETURN
- IF Correct$ = "I" THEN Pronounce$ = "I":RETURN
- IF Correct$ = "J" THEN Pronounce$ = "JAY":RETURN
- IF Correct$ = "K" THEN Pronounce$ = "KAY":RETURN
- IF Correct$ = "L" THEN Pronounce$ = "EL":RETURN
- IF Correct$ = "M" THEN Pronounce$ = "EM":RETURN
- IF Correct$ = "N" THEN Pronounce$ = "EN":RETURN
- IF Correct$ = "O" THEN Pronounce$ = "OH":RETURN
- IF Correct$ = "P" THEN Pronounce$ = "PEEEEEE":RETURN
- IF Correct$ = "Q" THEN Pronounce$ = "Q":RETURN
- IF Correct$ = "R" THEN Pronounce$ = "R":RETURN
- IF Correct$ = "S" THEN Pronounce$ = "S":RETURN
- IF Correct$ = "T" THEN Pronounce$ = "TEEEEEE":RETURN
- IF Correct$ = "U" THEN Pronounce$ = "U":RETURN
- IF Correct$ = "V" THEN Pronounce$ = "VEEEEEE":RETURN
- IF Correct$ = "W" THEN Pronounce$ = "W":RETURN
- IF Correct$ = "X" THEN Pronounce$ = "EX":RETURN
- IF Correct$ = "Y" THEN Pronounce$ = "Y":RETURN
- IF Correct$ = "Z" THEN Pronounce$ = "ZEEEEEE":RETURN
- Pronounce$ = Correct$
- RETURN
-
-
-
- GetAKey:
- A$ = INKEY$
- IF A$ = "" THEN GOTO GetAKey
- A$ = UCASE$(A$)
- RETURN
-
-
-
-
-
-