Words containing "the" substring: Difference between revisions

(Added Delphi example)
Line 581:
end if
end for</lang>
 
=={{header|Objeck}}==
<lang objeck>
class Thes {
function : Main(args : String[]) ~ Nil {
if(args->Size() = 1) {
reader := System.IO.File.FileReader->New(args[0]);
words := Collection.Generic.Vector->New()<String>;
line := reader->ReadLine();
while(line <> Nil) {
if(line->Size() > 11 & line->Has("the")) {
words->AddBack(line);
};
line := reader->ReadLine();
};
reader->Close();
 
found := words->Size();
"Found {$found} word(s):"->PrintLine();
each(i : words) {
word := words->Get(i);
"{$word} "->Print();
if(i > 0 & i % 5 = 0) {
'\n'->Print();
};
};
};
}
}</lang>
 
{{out}}
<pre>
Found 32 word(s):
authenticate chemotherapy chrysanthemum clothesbrush clotheshorse eratosthenes
featherbedding featherbrain featherweight gaithersburg hydrothermal
lighthearted mathematician neurasthenic nevertheless northeastern
northernmost otherworldly parasympathetic physiotherapist physiotherapy
psychotherapeutic psychotherapist psychotherapy radiotherapy southeastern
southernmost theoretician weatherbeaten weatherproof weatherstrip
weatherstripping</pre>
 
=={{header|Perl}}==
Line 619 ⟶ 659:
weatherstripping
/Code$ </lang>
 
 
=={{header|Phix}}==
760

edits