[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Writing to a File
From: |
Stewart Stremler |
Subject: |
[Help-smalltalk] Writing to a File |
Date: |
Sat, 22 Jan 2005 15:08:23 -0800 |
User-agent: |
Mutt/1.3.28i |
I'm failing to write newlines to a file.
> gst --version
GNU Smalltalk version 2.1.8
Copyright 2003 Free Software Foundation, Inc.
Written by Steve Byrne (address@hidden) and Paolo Bonzini (address@hidden)
.
.
.
Here's a small snippet of code that I thought ought to work:
-----------------------------------------------------------------------------
Smalltalk at: #foo put: (SortedCollection new) !
foo add: 'one' ; add: 'two' ; add: 'three' !
Smalltalk at: #bar put: (FileDescriptor open: 'bug_output' mode: #write) !
foo do: [:item| bar << item ; cr ; nl ] !
-----------------------------------------------------------------------------
...alas, it doesn't. I get a file with "onethreetwo" in it and that's it.
I've tried variations as well, but no linefeeds or carriage returns,
not even with "bar (nextPut: Character nl)".
What am I doing wrong?
--
Stewart Stremler
- [Help-smalltalk] Writing to a File,
Stewart Stremler <=