Re: [fpc-pascal] Example: regular expressions and hash-tables

2013-03-29 Thread S. Fisher
--- On Wed, 3/20/13, S. Fisher expandaf...@yahoo.com wrote: The program reads a text file and counts the number of unique words, and also displays the number of times the most common word was found. For comparison, here's a C++ program. Unlike the Pascal version, it shows the 20 most

Re: [fpc-pascal] Example: regular expressions and hash-tables

2013-03-29 Thread Mark Morgan Lloyd
S. Fisher wrote: --- On Wed, 3/20/13, S. Fisher expandaf...@yahoo.com wrote: The program reads a text file and counts the number of unique words, and also displays the number of times the most common word was found. For comparison, here's a C++ program. Unlike the Pascal version, it shows

Re: [fpc-pascal] Example: regular expressions and hash-tables

2013-03-22 Thread S. Fisher
--- On Wed, 3/20/13, S. Fisher expandaf...@yahoo.com wrote: The program reads a text file and counts the number of unique words, and also displays the number of times the most common word was found. Added an iterator of sorts for regular expressions. This allows if re.exec( line )

[fpc-pascal] Example: regular expressions and hash-tables

2013-03-21 Thread S. Fisher
Not actually a hash-table, but an AvgLvlTree, which can be used the same way. The AvgLvlTree unit comes with Lazarus; if you don't have that, you can download avglvltree.pas here: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/lazutils/avglvltree.pas?root=lazarusview=log There