Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Continuations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Keith Wansbrough <Keith.Wansbrough@c...>
Subject: Re: [Caml-list] Continuations
> Could someone explain me how the functions from the Printf module work, and
> why continuations allow to consume the extra arguments given after the
> format string ?

OCaml contains special magic to parse the format strings - they aren't
really strings.  Try doing

Printf.printf (if true then "%s,%s" else "%s.%s") "foo" "bar"

and see what happens...  (you have to use Pervasives.format_of_string
to make it work).

--KW 8-)



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