There are a couple of Tokenizers in the code archives that you could use for the first item.
You could do something like this:
That should sort all the words alphabetically.
You could do something like this:
Type entry Field word End Type w.entry = New entry w\word = Tokenize(s$) ; s$ perhaps from Readline(filehandle) temp.entry = First entry While temp\word > w\word : temp = After temp : Wend Insert w Before temp
That should sort all the words alphabetically.