From: Pierre Weis <Pierre.Weis@inria.fr>
To: checker@d6.com (Chris Hecker)
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] pretty printers and format and matrices
Date: Thu, 14 Jun 2001 08:46:31 +0200 (MET DST) [thread overview]
Message-ID: <200106140646.IAA08311@pauillac.inria.fr> (raw)
In-Reply-To: <4.3.2.7.2.20010612135731.029837a0@shell16.ba.best.com> from Chris Hecker at "Jun 12, 101 02:01:27 pm"
>
> >Once one gets used to it, it's really fun so don't give up...
>
> I had the choice of "try to get the formatting working for no other
> reason than curiosity" or "write more real code on my game", so the
> latter edged it out. :)
>
> > let print2d ppf a =
>
> This works better, thanks! I swear I tried something exactly like that...
>
> There's a tiny bit of weirdness with the tabs after the first
> column, but it's way better than what I had. I definitely tried the
> @\n, but I admit I was randomly typing at that point. The docs
> could stand to be a bit clearer on newlines versus breaks. Perhaps
> your print2d would make a good complementary tutorial to the
> expression printer in the FAQ...
>
> Thanks,
> Chris
Have you read the special paragraph devoted to Format in the FAQ ?
http://pauillac.inria.fr/caml/FAQ/format-eng.html
It says somewhere:
Practice
When writing a pretty-printing routine, follow these simple rules:
[...]
4.Don't try to force line breaking, let the pretty-printer do it for
you: that's its only job.
5.End your main program by a print_newline () call, that flushes the
pretty-printer tables (hence the ouput). (Note that the toplevel loop
of the interactive system does it as well, just before a new input.)
Best regards,
Pierre Weis
INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
prev parent reply other threads:[~2001-06-14 6:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-12 18:18 Chris Hecker
2001-06-12 19:03 ` Markus Mottl
2001-06-12 21:01 ` Chris Hecker
2001-06-13 12:16 ` Hendrik Tews
2001-06-14 19:37 ` Pierre Weis
2001-06-14 19:58 ` Patrick M Doane
2001-06-14 20:36 ` Pierre Weis
2001-06-14 21:35 ` Frank Atanassow
2001-06-15 12:43 ` Pierre Weis
2001-06-15 12:34 ` Hendrik Tews
2001-06-15 17:32 ` Pierre Weis
2001-06-14 6:46 ` Pierre Weis [this message]
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=200106140646.IAA08311@pauillac.inria.fr \
--to=pierre.weis@inria.fr \
--cc=caml-list@inria.fr \
--cc=checker@d6.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