script3.stx
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 30 Dec 2016 22:42:05 +0000
branchjv
changeset 1484 cef397199379
parent 1347 40c47f6d2dc6
child 1498 71eac66f2d96
permissions -rwxr-xr-x
Cleanup: do not save initial image Restarting from an image was always troublesome, expecially on Windows. Loading from scratch is fast enough nowadays.

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

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