Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Toplevel usage of stdout and stderr
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-04-06 (09:16)
From: Robert Roessler <roessler@r...>
Subject: Toplevel usage of stdout and stderr
I am close to finishing my LablGTK-based syntax-colored GUI for the 
toplevel... and I have noticed [the Windows version of] the ocaml 
toplevel seems to use both stdout and stderr for warnings and errors.

Chapter 9 of the Objective Caml manual clearly states "results are 
printed on standard output, errors on standard error" and further that 
the Windows ocaml.exe "works exactly as under Unix".

I would like to know if the apparent mixing of the two channels is 
intended, or if it is a bug (possibly just with the Windows version), 
and if there is some rationale for when stdout is used versus stderr.

This last would be of help to me, as I am trying to do "smart" 
filtering (and interpreting) of the toplevel output - and not having 
any model for what is going to show up where (other than knowing that 
the "inferred type and result value, if any" will go to stdout, as 
will the "# " prompt) makes this a little more difficult. :)

Robert Roessler