blob: 3127d773afe247bbb8c9ce4b7a84d1304fd54a2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
(* %n, %l, %N and %L have a scanf-specific semantics, but are supposed
to be interpreted by Printf and Format as %u, despite this
interpretation being mildly deprecated *)
let test format = (Printf.sprintf format (-3) : string)
;;
let () = Printf.printf "%%n: %B\n"
(test "%n" = test "%u")
;;
let () = Printf.printf "%%l: %B\n"
(test "%l" = test "%u")
;;
let () = Printf.printf "%%N: %B\n"
(test "%N" = test "%u")
;;
let () = Printf.printf "%%L: %B\n"
(test "%L" = test "%u")
;;
|