ABC words: Difference between revisions

Add CLU
(Add CLU)
Line 833:
55: tablecloth
</pre>
 
=={{header|CLU}}==
<lang clu>abc_word = proc (s: string) returns (bool)
a: int := string$indexc('a', s)
b: int := string$indexc('b', s)
c: int := string$indexc('c', s)
return(a>0 cand b>a cand c>b)
end abc_word
 
start_up = proc ()
po: stream := stream$primary_output()
dict: stream := stream$open(file_name$parse("unixdict.txt"), "read")
while true do
word: string := stream$getl(dict)
if abc_word(word) then stream$putl(po, word) end
end except when end_of_file: end
stream$close(dict)
end start_up</lang>
{{out}}
<pre style='height:50ex;'>aback
abacus
abc
abdicate
abduct
abeyance
abject
abreact
abscess
abscissa
abscissae
absence
abstract
abstracter
abstractor
adiabatic
aerobacter
aerobic
albacore
alberich
albrecht
algebraic
alphabetic
ambiance
ambuscade
aminobenzoic
anaerobic
arabic
athabascan
auerbach
diabetic
diabolic
drawback
fabric
fabricate
flashback
halfback
iambic
lampblack
leatherback
metabolic
nabisco
paperback
parabolic
playback
prefabricate
quarterback
razorback
roadblock
sabbatical
snapback
strabismic
syllabic
tabernacle
tablecloth</pre>
 
=={{header|Delphi}}==
2,095

edits