repo.or.cz
/
cslatevm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updated release image date.
[cslatevm.git]
/
tests
/
benchmark
/
sumfile.slate
blob
6ec81e0e81ccd7a4c3516b6b5d866598fbb975f6
1
2
name@(String traits) sumfile
3
[| sum |
4
sum := 0.
5
(File newNamed: name &mode: File Read)
6
sessionDo: [| :file stream |
7
stream := file reader.
8
[stream isAtEnd] whileFalse: [sum += stream nextLine as: Integer]].
9
sum
10
].