script3.stx
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 08 Jun 2016 00:20:44 +0100
branchjv
changeset 1440 b822d6dc20e7
parent 1347 40c47f6d2dc6
child 1498 71eac66f2d96
permissions -rwxr-xr-x
Merge

#!stx --script
"/
"/ a word count script
"/
|wc|

wc := 0.
[Stdin atEnd] whileFalse:[
    wc := wc + Stdin nextLine asCollectionOfWords size.
].
wc printCR.