ABC words: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add PL/I) |
|||
Line 1,259: | Line 1,259: | ||
55 abc words found: aback, abacus, abc, ..., syllabic, tabernacle, tablecloth |
55 abc words found: aback, abacus, abc, ..., syllabic, tabernacle, tablecloth |
||
</pre> |
</pre> |
||
=={{header|PL/I}}== |
|||
<lang pli>abcWords: procedure options(main); |
|||
declare dict file; |
|||
open file(dict) title('unixdict.txt'); |
|||
on endfile(dict) stop; |
|||
declare word char(32) varying, col fixed; |
|||
col = 0; |
|||
do while('1'b); |
|||
get file(dict) list(word); |
|||
declare (a, b, c) fixed; |
|||
a = index(word, 'a'); |
|||
b = index(word, 'b'); |
|||
c = index(word, 'c'); |
|||
if a ^= 0 & b ^= 0 & c ^= 0 & a < b & b < c then do; |
|||
put edit(word) (A(15)); |
|||
col = col + 1; |
|||
if col = 5 then do; |
|||
put skip; |
|||
col = 0; |
|||
end; |
|||
end; |
|||
end; |
|||
end abcWords;</lang> |
|||
{{out}} |
|||
<pre>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|Processing}}== |
=={{header|Processing}}== |