Anonymous user
Word frequency: Difference between revisions
m
→version 1: optimized the REXX program.
m (→version 1: fixed a comment.) |
m (→version 1: optimized the REXX program.) |
||
Line 294:
if z=='' then iterate /*if Z is now null, skip.*/
if @.z==0 then do; c=c+1; !.c=z; end /*bump word count; assign word to array*/
@.z=@.z + 1 /*bump the count of occurrences of word*/
end /*while*/
Line 316 ⟶ 315:
do d=1 for words(tl); _=word(tl, d) /*process each of the words in the TL. */
if d==1 then w=max(10, length(@._) ) /*use length of the first number used. */
say right(
@._=0 /*nullify this word count for next time*/
end /*d*/
|