[Home] [Puzzles & Projects] [Delphi Techniques] [Math topics] [Library] [Utilities]
|
|
Problem Description
This "Telephone words" program converts number strings into words based on
standard keypad number-to-letter assignments as illustrated here (e.g. 43556 ==>
HELLO). Background & TechniquesBusinesses like phone numbers that can be presented as words with the idea that they are easy to remember. I (and probably most callers) dislike them because it slows and complicates the dialing process. But they do make interesting puzzles. One of the restriction when extracting words from numbers is that "0" and "1" have no associated letters. In this program, "0"s are ignored and "1"s treated as space characters thus creating multiple-word numbers. Users can enter an arbitrary number strings to see possible translations. A set of test words that can be translated by clicking is included. Translations can be by clicking on test words provided. For long words, the chance having multiple translations is slim but for shorter mutli-word number, more than one word may have multiple trnslations. The program will display separate "solutions" for each combination of multi-word strings. For example try translating "46631364" to get "GOOD DOG" and 13 other possibilities. Non-programmers are welcome to read on, but may want to jump to bottom of this page to download the executable program now. Programmer's Notes:Recursion (routines that call themselves) come to the rescue twice In this program:
One more note: The source download includes a version of he UDict dictionary unit with a minor change that allows LookupPartial to accept the letter D (as in DOG) as a partial word. DFFLIBV15 has been updated with the change (and D removed as an abbreviation in Fulll.dic), but no need to re-download it now.
Running/Exploring the Program
Suggestions for Further Explorations
|
[Feedback] [Newsletters (subscribe/view)] [About me]Copyright © 2000-2018, Gary Darby All rights reserved. |