Dictionary list.

BlitzMax Forums/BlitzMax Programming/Dictionary list.

Iv been asked to code a small tool to scan a body of text, and pull all ONLY UNIQUE words, and drop them into a text file, one per line.

Before I started on this I thought I would ask if anyone has anything that could do this or that may help.

Your best approach to this problem will be to break your text file down into single words, and add each to a tList.

You then need to iterate through the tList and check for duplicates. Every time you find a duplicate, simply remove it from the list. You could use a couple of nested For/EachIn's to do this.

If you're planning on doing this to create a usable dictionary for a word game or such, its probably a bad idea. Your bodytext might contain capitalised words such as people's names, or names of countries, or even abbreviations - all of which would not be allowed in a word game.

well what gfk said but use a tMap instead of a list and you wont have to sort out any duplicates

done it.. thanks for the tips.