From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA11586; Mon, 9 Sep 2002 21:33:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA11930 for ; Mon, 9 Sep 2002 21:33:54 +0200 (MET DST) Received: from laurelin.dementia.org ([208.167.88.73]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g89JXr128302 for ; Mon, 9 Sep 2002 21:33:53 +0200 (MET DST) Received: by laurelin.dementia.org (Postfix, from userid 1001) id D649570D2; Mon, 9 Sep 2002 15:34:27 -0400 (EDT) To: Lukasz Lew Cc: caml-list@inria.fr Subject: Re: [Caml-list] Does this function exist? References: From: John Prevost Date: 09 Sep 2002 15:34:27 -0400 (81.559 UMT) In-Reply-To: Message-ID: <86hegzarek.fsf@laurelin.dementia.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "ll" == Lukasz Lew writes: 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. John. ------------------- 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