Buffered output may need to be flushed e.g. by writing again, by using flush/1, or by closing the stream.
Stream can be a symbolic stream name (atom) or a physical stream number (integer).
Success:
      flush(output).
      flush(null).
      [eclipse]: pipe(in,out), write(out, 'q(a).\n'),
      > flush(out), read(in,T).
      T = q(a).
      yes.
Error:
      flush(Stream).            (Error 4).
      flush("Stream").          (Error 5).
      flush(12).                (Error 192). % no such stream
      flush(debug_input).       (Error 192). % input stream