Oups!

Usually, it's way nicer/better/suggested to declare all variables...  Forgot "lines" !
.

Nicer version:

| file lines  |

lines := OrderedCollection new.

file := StandardFileStream readOnlyFileNamed: 'day.1.input'.
[file atEnd] whileFalse: [lines add: file nextLine].
file close.





-----------------
Beno��t St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Sunday, December 2, 2018, 6:09:42 a.m. EST, Roelof Wobben <r.wobben@home.nl> wrote:


Op 2-12-2018 om 11:55 schreef Benoit St-Jean via Pharo-users:

Nope, only the part how I can read the file.


Roelof