Sub LookUp
TextWindow.ForegroundColor = "White"
TextWindow.WriteLine(Clock.Date)
TextWindow.WriteLine(Clock.Time)
Sound.PlayChimeAndWait()
TextWindow.WriteLine("Type a word and hit the Enter key to look it up!")
Speech.Speak("Type a word and hit they Enter key to look it up!")
word = TextWindow.Read()
def = Dictionary.GetDefinition(word)
TextWindow.Write("Here is your definition for ")
TextWindow.Write(word)
TextWindow.Write(":")
Speech.Speak("Here is your definition for ")
Speech.Speak(word)
Speech.Speak(":")
TextWindow.WriteLine(def)
Sound.PlayBellRingAndWait()
TextWindow.WriteLine("Thank you for using the Dictionary Lookup!")
Speech.Speak("Thank you for using the Dictionary Lookup!")
EndSub
Sub Again
TextWindow.WriteLine("Would you like to look up another word?")
Speech.Speak("Would you like to look up another word?")
TextWindow.WriteLine("If yes, type the letter y. If no, type anything else.")
Speech.Speak("If yes, type the letter y. If no, type anything else.")
If (TextWindow.Read() = "y") Then
LookUp()
Again()
Else
TextWindow.WriteLine("Goodbye.")
Speech.Speak("Goodbye.")
Program.Delay(1000)
Program.End()
EndIf
EndSub
TextWindow.ForegroundColor = "Blue"
TextWindow.WriteLine("Welcome to Dictionary Lookup in Small Basic by Abhi S.")
LookUp()
Again()