From: Johann Spies <jspies@maties.sun.ac.za>
To: ocaml mailing list <caml-list@inria.fr>
Subject: [Caml-list] Printf.sprintf ?
Date: 15 Aug 2001 11:49:53 +0200 [thread overview]
Message-ID: <87r8udirem.fsf@bywoner.sun.ac.za> (raw)
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
next reply other threads:[~2001-08-15 9:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-15 9:49 Johann Spies [this message]
2001-08-15 15:27 ` Brian Rogoff
2001-08-16 9:27 ` Remi VANICAT
[not found] <200108151045.f7FAjl423204@sarg.ryerson.ca>
2001-08-15 11:04 ` Johann Spies
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r8udirem.fsf@bywoner.sun.ac.za \
--to=jspies@maties.sun.ac.za \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox