caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Printf.sprintf ?
@ 2001-08-15  9:49 Johann Spies
  2001-08-15 15:27 ` Brian Rogoff
  0 siblings, 1 reply; 4+ messages in thread
From: Johann Spies @ 2001-08-15  9:49 UTC (permalink / raw)
  To: ocaml mailing list

Can somebody please explain this to me:

This works as expected:

# let s = Printf.sprintf "%s" "enigiets";;
val s : string = "enigiets"

But this not:

# let q = "%s";;
val q : string = "%s"
# let s = Printf.sprintf q "enigiets";;
Characters 23-24:
This expression has type string but is here used with type
  (string -> 'a, unit, string) format

Why?

Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Praying always with all prayer and supplication in the
      Spirit, and watching thereunto with all perseverance 
      and supplication for all saints."       Ephesians 6:18
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2001-08-16 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200108151045.f7FAjl423204@sarg.ryerson.ca>
2001-08-15 11:04 ` [Caml-list] Printf.sprintf ? Johann Spies
2001-08-15  9:49 Johann Spies
2001-08-15 15:27 ` Brian Rogoff
2001-08-16  9:27   ` Remi VANICAT

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