diff --git a/85_Synonym/ruby/synonim.rb b/85_Synonym/ruby/synonim.rb index f4dcb558..6334104a 100644 --- a/85_Synonym/ruby/synonim.rb +++ b/85_Synonym/ruby/synonim.rb @@ -1,4 +1,25 @@ - +######################################################## +# +# Synonym +# +# From Basic Computer Games (1978) +# +#A synonym of a word is another word (in the English language) which has the same, +#or very nearly the same, meaning. This program tests your knowledge of synonyms +#of a few common words. +# +#The computer chooses a word and asks you for a synonym. The computer then tells +#you whether you’re right or wrong. If you can’t think of a synonym, type “HELP” +#which causes a synonym to be printed. +#You may put in words of your choice in the data statements. +#The number following DATA in Statement 500 is the total number of data statements. +#In each data statement, the first number is the number of words in that statement. +# +#Can you think of a way to make this into a more general kind of CAI program for any subject? +#Walt Koetke of Lexington High School, Massachusetts created this program. +# +# +######################################################## puts <<~INSTRUCTIONS SYNONYM @@ -56,4 +77,18 @@ synonym_words.each {|words_ar| } -puts "SYNONYM DRILL COMPLETED" \ No newline at end of file +puts "SYNONYM DRILL COMPLETED" + + +###################################################################### +# +# Porting notes +# +# There is a bug in the original program where if you keep asking for +# synoyms of a given word it ends up running out of synonyms +# in the array and the program crashes. +# The bug has been fixed in this version and now when +# it runs out of words it continues with the next +# array. +# +######################################################################