* programmatic access to toplevel print facilities
@ 2006-04-26 18:59 Sam Steingold
2006-04-27 9:23 ` [Caml-list] " Richard Jones
2006-05-03 18:08 ` Lukasz Stafiniak
0 siblings, 2 replies; 3+ messages in thread
From: Sam Steingold @ 2006-04-26 18:59 UTC (permalink / raw)
To: caml-list
is there a way to access the top-level printing facilities from a program?
e.g., ocaml toploop will print a complex structure nicely:
# let x = make_my_huge_struct ();;
val x : my_huge_struct =
{a = 1; b = 2; c = 3; ...}
how do I access this from a program?
e.g., if I have an array of my_huge_struct, I want to be able to examine
a part of it:
let show_part arr p1 p2 =
for i = p1 to p2 do
ocaml_toploop_print (Array.get arr i)
done
# show_part array_of_huge_structs 100 105;;
(in lisp I would do
(loop :for i :from p1 :to p2 :do (print (aref array_of_huge_structs i))))
--
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://ffii.org http://truepeace.org http://palestinefacts.org
http://memri.org http://dhimmi.com http://openvotingconsortium.org
Your mouse has moved - WinNT has to be restarted for this to take effect.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] programmatic access to toplevel print facilities
2006-04-26 18:59 programmatic access to toplevel print facilities Sam Steingold
@ 2006-04-27 9:23 ` Richard Jones
2006-05-03 18:08 ` Lukasz Stafiniak
1 sibling, 0 replies; 3+ messages in thread
From: Richard Jones @ 2006-04-27 9:23 UTC (permalink / raw)
To: caml-list
On Wed, Apr 26, 2006 at 02:59:02PM -0400, Sam Steingold wrote:
> is there a way to access the top-level printing facilities from a program?
Have a look at this thread:
http://caml.inria.fr/pub/ml-archives/caml-list/2005/03/656798aa05be7a035311a2ecb0eac80d.en.html
There's also a library around which allows you to access Toploop, but
I'm afraid my Google-fu is failing me today and I can't find it.
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] programmatic access to toplevel print facilities
2006-04-26 18:59 programmatic access to toplevel print facilities Sam Steingold
2006-04-27 9:23 ` [Caml-list] " Richard Jones
@ 2006-05-03 18:08 ` Lukasz Stafiniak
1 sibling, 0 replies; 3+ messages in thread
From: Lukasz Stafiniak @ 2006-05-03 18:08 UTC (permalink / raw)
To: sds, caml-list
Recently announced (needs MetaOCaml):
http://caml.inria.fr/pub/ml-archives/caml-list/2006/04/0736adcbad82194c50b04de1b3422b1c.en.html
http://pobox.com/~oleg/ftp/ML/gprint/
On 4/26/06, Sam Steingold <sds@podval.org> wrote:
> is there a way to access the top-level printing facilities from a program?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-03 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26 18:59 programmatic access to toplevel print facilities Sam Steingold
2006-04-27 9:23 ` [Caml-list] " Richard Jones
2006-05-03 18:08 ` Lukasz Stafiniak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox