OK, and in what way did you not achieve your aim, and what did you try to do to fix it.
Please also use code tags to make reading your code more readable.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
Try running that on say windows.pas, how long does that take? answer: Ages.
Dont use delete.. no point, its incredibly bad on memory as each time you are allocating and unallocating and moving it around.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
delete is a bad bad idea if you can avoid it. Which you can. Have a go at doing it without the delete, its a good fun thing to work on as it helps you think about speed issues for other matters another day.
I set it as a challenge for a bunch before, to take windows.pas and count the number of words eg no numbers, punctuation etc. it was a good challenge, we had some great answers and everyone learnt.. its good.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190