From: Lukasz Lew <ll189417@zodiac.mimuw.edu.pl>
To: John Prevost <j.prevost@cs.cmu.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Does this function exist?
Date: Mon, 9 Sep 2002 22:18:08 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.44.0209092212360.21417-100000@zodiac.mimuw.edu.pl> (raw)
In-Reply-To: <86hegzarek.fsf@laurelin.dementia.org>
> ll> Hello Is there in OCaml a function ['a -> ()] which would
> ll> print striong representation of first arument on stdout, just
> ll> like OcamlTop does?
>
> ll> print [3; 3];;
>
> ll> should print: "- : int list = [3; 3]"
>
> ll> It would be very usefull for debugging. Lukasz Lew
>
> It would be, but I don't believe that it's really possible--you need
> type information in order to determine what to display, and that
> information is not available at runtime. If you know the type of what
> you're printing, you can always use printf.
OK, so I want just "[3; 3]", (no type information),
I can use printf, but it isn't very easy to write when you have i.e.
list of pairs of lists. And i believe that there is unversal ``print''.
Can you help?
Lukasz Lew
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-09-09 20:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-09 17:56 Lukasz Lew
2002-09-09 19:34 ` John Prevost
2002-09-09 20:18 ` Lukasz Lew [this message]
2002-09-09 20:55 ` John Prevost
2002-09-09 20:59 ` Lukasz Lew
2002-09-17 16:21 ` Kontra, Gergely
2002-09-17 17:17 ` Florian Hars
2002-09-09 21:40 ` Yutaka OIWA
2002-09-09 23:10 ` Nicolas Cannasse
[not found] ` <Pine.LNX.4.44.0209092212360.21417-100000@zodiac.mimuw.edu. pl>
2002-09-09 22:05 ` Chris Hecker
2002-09-09 22:48 ` Remi VANICAT
2002-09-10 1:10 ` Daniel de Rauglaudre
2002-09-16 16:56 ` Kontra, Gergely
2002-09-12 15:31 ` [Caml-list] " Michaël Grünewald
2002-09-18 23:01 [Caml-list] " Gurr, David (MED, self)
2002-09-18 23:01 Gurr, David (MED, self)
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=Pine.LNX.4.44.0209092212360.21417-100000@zodiac.mimuw.edu.pl \
--to=ll189417@zodiac.mimuw.edu.pl \
--cc=caml-list@inria.fr \
--cc=j.prevost@cs.cmu.edu \
/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