procedure main() wchar := &lcase ++ &ucase ++ '\'-' wordlength := list(10,0) # initial zero counts while line := read() do { i := 1 while j := upto(wchar,line,i) do { i := many(wchar,line,j) wordlength[*line[i:j]] +:= 1 } } write("word length count:\n") i := 0 while i < *wordlength do { i +:= 1 write(left(i || ":",12),right(wordlength[i],3)) } end