searching dictionary

BlitzPlus Forums/BlitzPlus Programming/searching dictionary

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi,
I would like to search a dictionary file to see if a word is valid.
I have a text file where all english words are listed alphabetically separated by a space.

I have my own ideas of how I could acheive this but thought it was worthwhile asking you guys as often someone will suggest a much better why of acheiving the same end result.


My idea was to load all the words into 26 banks which handles match the start letter.

And then search through the relevant bank to see if there is a match.

I really need this function to operate very fast as it will hopefully be used in the main game loop.

Please let me know any ideas you may have and code examples if possible.

Thanks in advance.