[Newbies] Opening a file twice

johnps11 at bigpond.com johnps11 at bigpond.com
Thu Jul 5 23:23:40 UTC 2007

Thanks Dave.

I'd looked at #close, but already had the system in a pretty weird state
so it didn't seem to help.

#ensure: is the kind of thing I really needed - but never found.

Two more questions arise:

1) How do I get a password to edit the wiki?  The page  'Recipe: Reading a
file' could use a note about this.

2) When I had things really borked I did a  'Explore it' on 'FileStream
allInstances' and saw a few entries that had all the fields set to nil
except fileID, which was the same value as a valid stream on the file.  In
Windows or unix I can close a file if all I have is the file
descriptor(/handle).  How would I close the file if I've broken all the
references, apart from forcing a garbage collect?

> Hi John,
> (Note: I'm using ":=" rather than "_" for assigning to a variable.
> Either one will work, but in the last couple of years, folks have
> been moving to the convention of using ":=" instead of "_").

'_' is very convenient on a Dvorak keyboard.

> HTH,
> Dave

More information about the Beginners mailing list