Odd words: Difference between revisions

m
→‎version 2, caseless: used more idiomatic code.
No edit summary
m (→‎version 2, caseless: used more idiomatic code.)
Line 713:
if iFID=='' | iFID=="," then iFID='unixdict.txt' /* " " " " " " */
@.= /*default value of any dictionary word.*/
do #=1 while lines(iFID)\==0 /*read each word in the file (word=X).*/
x= strip( linein( iFID) ) /*pick off a word from the input line. */
$.#= x; upper x; @.x= . /*save: original case and the semaphore*/
end /*#*/ /* [↑] semaphore name is uppercased. */
#= # - 1 /*adjust word count because of DO loop.*/
#= # - 1
minW= minL * 2 - 1 /*minimum width of a word to be usable.*/
say copies('─', 30) # "words in the dictionary file: " iFID
Line 732:
say right(left($.j, 20), 24) left(ow, 9) /*indent original word for readability.*/
end /*j*/
say copies('─', 30) ows ' "odd words" found with a minimum length of ' minL</lang>
</lang>
{{out|output|text=&nbsp; when using the default input:}}
<pre>