Anonymous user
ABC words: Difference between revisions
m
→{{header|REXX}}: added a comment.
m (→{{header|REXX}}: used more idiomatic code.) |
m (→{{header|REXX}}: added a comment.) |
||
Line 655:
It also allows the (ABC) characters to be specified on the command line (CL) as well as the dictionary file identifier.
<lang rexx>/*REXX
parse arg
if
if iFID=='' | iFID=="," then iFID='unixdict.txt' /* " " " " " " */
@.= /*default value of any dictionary word.*/
do #=1 while lines(iFID)\==0
x= strip( linein( iFID) )
$.#= x;
end /*#*/
#= # - 1 /*adjust word count because of DO loop.*/
say
end
p= _ /*save the position of the last letter.*/▼
finds= finds + 1 /*bump the count of alternades found.*/
say right(left($.j, 20), 25) left(p.1, 10) left(p.0, 10) /*indent a bit.*/
end /*j*/
say copies('─',
{{out|output|text= when using the default input:}}
<pre>
|