caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] higher-order and format
@ 2003-05-27 20:52 Stephen Tse
  2003-05-27 21:10 ` David Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephen Tse @ 2003-05-27 20:52 UTC (permalink / raw)
  To: caml-list



is this a bug?



        Objective Caml version 3.06

# let p = Format.sprintf "umm... %d";;
val p : int -> string = <fun>
# p 1;;
- : string = "umm... 1"
# p 1;;
- : string = "1"


# let q x = Format.sprintf "umm... %d" x;;
val q : int -> string = <fun>
# q 1;;
- : string = "umm... 1"
# q 1;;
- : string = "umm... 1"
# 


-------------------
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


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

* Re: [Caml-list] higher-order and format
  2003-05-27 20:52 [Caml-list] higher-order and format Stephen Tse
@ 2003-05-27 21:10 ` David Brown
  2003-05-27 21:13 ` Chris Hecker
  2003-05-27 21:20 ` Olivier Andrieu
  2 siblings, 0 replies; 4+ messages in thread
From: David Brown @ 2003-05-27 21:10 UTC (permalink / raw)
  To: Stephen Tse; +Cc: caml-list

On Tue, May 27, 2003 at 04:52:47PM -0400, Stephen Tse wrote:

> is this a bug?
>
> ...examples of sprintf partially applied...

It is documented for printf, but the behavior is not documented for
sprintf.  Although, it does do what I would expect :-)

None of the format function really do the "right" thing when they are
partiall applied.

Dave Brown

-------------------
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


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

* Re: [Caml-list] higher-order and format
  2003-05-27 20:52 [Caml-list] higher-order and format Stephen Tse
  2003-05-27 21:10 ` David Brown
@ 2003-05-27 21:13 ` Chris Hecker
  2003-05-27 21:20 ` Olivier Andrieu
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Hecker @ 2003-05-27 21:13 UTC (permalink / raw)
  To: Stephen Tse, caml-list


>is this a bug?

No, it's a FAQ.

Chris


-------------------
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


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

* Re: [Caml-list] higher-order and format
  2003-05-27 20:52 [Caml-list] higher-order and format Stephen Tse
  2003-05-27 21:10 ` David Brown
  2003-05-27 21:13 ` Chris Hecker
@ 2003-05-27 21:20 ` Olivier Andrieu
  2 siblings, 0 replies; 4+ messages in thread
From: Olivier Andrieu @ 2003-05-27 21:20 UTC (permalink / raw)
  To: Stephen Tse; +Cc: caml-list

 Stephen Tse [ 27 May 2003] :
 > 
 > is this a bug?

no, it's a FAQ :

http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#printf

-------------------
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


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

end of thread, other threads:[~2003-05-27 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-27 20:52 [Caml-list] higher-order and format Stephen Tse
2003-05-27 21:10 ` David Brown
2003-05-27 21:13 ` Chris Hecker
2003-05-27 21:20 ` Olivier Andrieu

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).