caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: roessler@rftp.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Toplevel usage of stdout and stderr
Date: Wed, 06 Apr 2005 19:46:34 +0900 (JST)	[thread overview]
Message-ID: <20050406.194634.00976783.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <4253A8E0.8090802@rftp.com>

From: Robert Roessler <roessler@rftp.com>

> 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".

Sometimes even developers don't read the manual.
I was convinced that in interactive mode errors go to stdout.
I even remember some discussions about this.
In practice it seems that errors go to stdout, but warnings go to
stderr. Not surprising as prerr_warning takes no parameter and prints
(almost) directly to stderr.

Sorry for this confusing situation. On Unix this is not too bad, but
on windows the buffering can be a pain IIRC.

If you are calling ocaml as a subprocess, ocamlbrowser provides a way
to do it, and even to kill the subprocess. Look in shell.ml. This is
rather mixed with Tk parts. The point is that on windows Fileinput did
not work on pipes, so an alternative system is coded using threads.

Jacques Garrigue


  reply	other threads:[~2005-04-06 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06  9:16 Robert Roessler
2005-04-06 10:46 ` Jacques Garrigue [this message]
2005-04-07  3:40   ` [Caml-list] " Robert Roessler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050406.194634.00976783.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=roessler@rftp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).