caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Toploop.setvalue
@ 2009-03-08 21:43 Roland Zumkeller
  2009-03-13  4:53 ` [Caml-list] Toploop.setvalue Dave Benjamin
  2009-03-13 15:22 ` Toploop.setvalue Zheng Li
  0 siblings, 2 replies; 3+ messages in thread
From: Roland Zumkeller @ 2009-03-08 21:43 UTC (permalink / raw)
  To: caml-list

Hi,

Can Toploop.setvalue be used to bind a value to an identifier, as does "let"?

# Toploop.setvalue "b" (Obj.repr 43);;
- : unit = ()
# b;;
Unbound value b

I only got the other direction to work:

# let a = 42;;
val a : int = 42
# (Obj.obj (Toploop.getvalue "a") : int);;
- : int = 42

Best,

Roland


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-13 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-08 21:43 Toploop.setvalue Roland Zumkeller
2009-03-13  4:53 ` [Caml-list] Toploop.setvalue Dave Benjamin
2009-03-13 15:22 ` Toploop.setvalue Zheng Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).