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
[Caml-list] Does this function exist?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-09 (19:33)
From: John Prevost <j.prevost@c...>
Subject: Re: [Caml-list] Does this function exist?
>>>>> "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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: