In Roddy's own words:
"I was using the "Find" method on an unsorted TStringlist... which you're not supposed to do. Sometimes it works (my initial test case had the items in my list already sorted, just by coincidence), but usually it doesn't..."
So, Roddy had two options:
{...} Names.LoadFromFile('names.txt'); Names.Sorted := True; {...}
...or...
//Instead of using Names.find, do the following: Result := Names.IndexOf('Bobby Fisher');
Thanks again to Roddy for suggesting this puzzle. If you'd like to submit an idea for a puzzle, email me at jacob(at)twodesk.com.
3 Comments
Any chance for a few updates here?
Good afternoon! Beautiful Kiev woman information there. escort men. I am pleased to welcome you to its website, prostitutes Kiev - Fish. You can visit my blog.
Interesting and informative. But will you write about this one more?
Post a Comment