1 # @(#)wc.tcl 8.2 (Berkeley) 11/18/95
8 set lines [viLastLine $viScreenId]
11 for {set i $viStartLine} {$i <= $viStopLine} {incr i} {
12 set outLine [split [string trim [viGetLine $viScreenId $i]]]
13 set words [expr $words + [llength $outLine]]
15 viMsg $viScreenId "$words words"