[mercury-users] Queries Clarifications for io.m
Ralph Becket
rafe at cs.mu.OZ.AU
Tue Nov 26 19:18:41 AEDT 2002
Noel Pinto, Tuesday, 26 November 2002:
>
> 1)io__flush_ouput flushes the output to the output buffer. What I
> understand that it passes the result to the output buffer. ( What
> do you mean flushing output to the output buffer)
Most IO operations are buffered by the operating system for efficiency:
it is cheaper to read and write many bytes at a time than individual
bytes. Hence you cannot usually assume that a particular call to
io__write, say, will make any visible difference until you call
io__flush_output, which causes all buffered output to actually be
written. Buffered output is often flushed automatically when you output
a newline (`\n').
> 2) io__output_stream retrieves the current output stream and does
> not modify the IO state. What does it mean by that it does not
> modify the IO state? Plz do explain.
What it says: calling this predicate does not modify the IO state in
any detectable way. It merely tells you what the current output stream
is.
- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list