in reply to Re: Using +> for File Read/Write
in thread Using +> for File Read/Write

I've never needed to use this one, either. I'd suspect a design flaw if I did

I've had to use it for writing certain files as part of a Lucene-compatible index. The file has to be created anew, and +< will not create a new file, only open an existing one. Later, just before the file is closed, it's necessary to seek back to near the top of the file and write a count that is not known until the rest of the file has been written.

The file format could also have been spec'd to write the count in a tail section rather than a head, but I don't think it matters too much. Having the count at the head of the file rather than the end simplifies reading a bit. EOF really means EODATA, for instance.

--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com