pascalabcnet/InstallerSamples/LINQ/TextFileCount1.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

8 lines
262 B
ObjectPascal

begin
var d := Dict('begin' => 0);
var delims := Seq(' ',')','(',';','''',',','.','[',']',#10,#13);
var words := ReadAllText('TextFileCount1.pas').ToWords(delims);
foreach var word in words do
d[word] := d.Get(word) + 1;
d.Print(NewLine);
end.