Find words with alternating vowels and consonants: Difference between revisions

m
→‎{{header|REXX}}: added whitespace, optimized first DO loop.
(Add Seed7)
m (→‎{{header|REXX}}: added whitespace, optimized first DO loop.)
Line 2,144:
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 /*save: original case and the semaphore*/
end /*#*/ /* [↑] semaphore name is uppercased. */
#= # - 1 /*adjust the record count (DO loop). */
Line 2,176:
finds= finds + 1 /*bump the count of "odd words" found. */
w= max(w, L) /*obtain the maximum length word found.*/
@@@= @@@ $.j /*add a word to the list of words found*/
end /*j*/
/*stick a fork in it, we're all done. */
Line 2,183:
do out=1 for finds; z= word(@@@, out) /*build a list that will be displayed. */
if length(_ right(z, w))>130 then do; say substr(_, 2); _=; end /*show a line.*/
_= _ right(z, w) /*append (aligned word) to output line.*/
end /*out*/
/*stick a fork in it, we're all done. */