View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams[_2_] Tim Williams[_2_] is offline
external usenet poster
 
Posts: 298
Default How to flush file buffers or ensure reliable writes?

I don't have an answer for your question, but out of interest what's the
problem you're trying to fix ?

Tim

"Joe User" <joeu2004 wrote in message
...
When I do Print#, I do not want to buffer the data in the application.

I tried Len=0 on the Open statement. That results in an error, which
comes as no surprise given the documentation (help page).

Len=1 "works" insofar as there is no error. But I don't know if it is
doing what I intend.

Is there some way to flush the application buffer for a particular file
descriptor, other than closing and reopening the file?

Some applications and O/Ses have a flush statement or function or some
file operation that causes a flush, e.g. writing an EOF.

Extra credit....

Is there some way to flush O/S buffers for the file; that is, to initiate
(if not complete) writes to the disk?

That might be too much to ask ;-). Even closing the file does not always
accomplish that in some O/Ses. But some O/Ses provide functions for that
purpose (flushing O/S buffers), or at least they claim to.