Browse thread
Trouble with Scanf and files
-
Christopher Kauffman
- Karl Zilles
-
Olivier Andrieu
- Chris Kauffman
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Chris Kauffman <kauffman@c...> |
| Subject: | Re: [Caml-list] Trouble with Scanf and files |
Most interesting - I used Scanf.Scanning.from_file as the documentation states that it uses block reads that are easier on the I/O system than Scanning.from_channel. I rewrote using instead the standard Pervasives.open_in and the associated input_line and Scanf.sscanf; this seems to work fine for my purposes. Olivier seems to have hit the nail on the head: if the end of a file is not reached with Scanning.from_file, it stays open with essentially no way to close it (other than artificially scanning to the end). I think this issue is worth a bug report so I'll see if I can submit one. Thanks for helping to resolve this. -Chris