Find words which contains more than 3 e vowels: Difference between revisions
Content added Content deleted
(strengthened testing for requirements.) |
m (→{{header|REXX}}: changed some comments.) |
||
Line 25: | Line 25: | ||
say copies('─', 30) # "words in the dictionary file: " iFID |
say copies('─', 30) # "words in the dictionary file: " iFID |
||
finds= 0 /*count of the "eeee" words found. */ |
finds= 0 /*count of the "eeee" words found. */ |
||
vowels= 'aeiou' |
vowels= 'aeiou' /*obtain the list of all the vowels. */ |
||
upper vowels /*uppercase all the other vowels. */ |
upper vowels /*uppercase all the other vowels. */ |
||
vowels= space( translate( vowels, , chrU), 0) /*elide the |
vowels= space( translate( vowels, , chrU), 0) /*elide the one vowel we're looking for*/ |
||
do j=1 for #; $= @.j /*process all the words that were found*/ |
do j=1 for #; $= @.j /*process all the words that were found*/ |
||
upper $ /*uppercase it for caseless finds. */ |
upper $ /*uppercase it for caseless finds. */ |
||
if |
if verify(vowels, $, 'M')>0 then iterate /*Does it contain other vowels? Skip it*/ |
||
if |
if countstr(chrU, $) < many then iterate /*Does it have enough of 'e's? " "*/ |
||
finds= finds + 1 /*bump count of only "e" vowels found. */ |
|||
finds= finds + 1 /*bump the count of "ABC" words found. */ |
|||
say right(left(@.j, 30), 40) /*indent original word for readability.*/ |
say right(left(@.j, 30), 40) /*indent original word for readability.*/ |
||
end /*j*/ |
end /*j*/ |