Words containing "the" substring: Difference between revisions

m
→‎{{header|REXX}}: made more idiomatic.
m (→‎{{header|REXX}}: adjusted the word count.)
m (→‎{{header|REXX}}: made more idiomatic.)
Line 540:
tell= minL>0; minL= abs(minL) /*use absolute value of minimum length.*/
@.= /*default value of any dictionary word.*/
do #=1 while lines(iFID)\==0 /*read each word in the file (word=X).*/
@.#= strip( linein( iFID) ) /*pick off a word from the input line. */
end /*#*/
#= # - 1 /*adjust word count because of DO loop.*/
$u= $; upper $u /*obtain an uppercase version of $. */
say copies('─', 25) #-1 "words in the dictionary file: " iFID
say
finds= 0 /*count of the substring found in dict.*/
do j=1 for #-1; z= @.j; upper z /*process all the words that were found*/
if length(z)<minL then iterate /*Is word too short? Yes, then skip.*/
if pos($u, z)==0 then iterate /*Found the substring? No, " " */