Words containing "the" substring: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) m (fix order) |
Not a robot (talk | contribs) (Add BCPL) |
||
Line 355: | Line 355: | ||
southernmost |
southernmost |
||
theoretician |
theoretician |
||
weatherbeaten |
|||
weatherproof |
|||
weatherstrip |
|||
weatherstripping</pre> |
|||
=={{header|BCPL}}== |
|||
<lang bcpl>get "libhdr" |
|||
let read(word) = valof |
|||
$( let ch = ? |
|||
word%0 := 0 |
|||
$( ch := rdch() |
|||
if ch = endstreamch then resultis false |
|||
word%0 := word%0 + 1 |
|||
word%(word%0) := ch |
|||
$) repeatuntil ch = '*N' |
|||
resultis true |
|||
$) |
|||
let contains(s1,s2) = valof |
|||
$( for i=1 to s1%0-s2%0+1 |
|||
$( for j=1 to s2%0 |
|||
unless s1%(i+j-1)=s2%j goto next |
|||
resultis true |
|||
next: loop |
|||
$) |
|||
resultis false |
|||
$) |
|||
let match(word) = word%0 > 11 & contains(word,"the") |
|||
let start() be |
|||
$( let word = vec 63 |
|||
let file = findinput("unixdict.txt") |
|||
test file=0 do |
|||
writes("Cannot open unixdict.txt*N") |
|||
or |
|||
$( selectinput(file) |
|||
while read(word) if match(word) do writes(word) |
|||
endread() |
|||
$) |
|||
$)</lang> |
|||
{{out}} |
|||
<pre style='height:50ex;'>authenticate |
|||
brotherhood |
|||
calisthenic |
|||
chemotherapy |
|||
chrysanthemum |
|||
clothesbrush |
|||
clotheshorse |
|||
clothesline |
|||
earthenware |
|||
endothelial |
|||
endothermic |
|||
eratosthenes |
|||
featherbedding |
|||
featherbrain |
|||
featherweight |
|||
furtherance |
|||
furthermore |
|||
furthermost |
|||
gaithersburg |
|||
grandfather |
|||
grandmother |
|||
hydrothermal |
|||
kinesthesis |
|||
leatherback |
|||
leatherneck |
|||
leatherwork |
|||
lighthearted |
|||
mathematician |
|||
netherlands |
|||
netherworld |
|||
neurasthenic |
|||
nevertheless |
|||
nonetheless |
|||
northeastern |
|||
northernmost |
|||
otherworldly |
|||
parasympathetic |
|||
parentheses |
|||
parenthesis |
|||
parenthetic |
|||
physiotherapist |
|||
physiotherapy |
|||
psychotherapeutic |
|||
psychotherapist |
|||
psychotherapy |
|||
radiotherapy |
|||
smithereens |
|||
southeastern |
|||
southernmost |
|||
sympathetic |
|||
thenceforth |
|||
theoretician |
|||
therapeutic |
|||
thereabouts |
|||
theretofore |
|||
weatherbeaten |
weatherbeaten |
||
weatherproof |
weatherproof |