Advertisement
Guest User

Untitled

a guest
Apr 12th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.77 KB | None | 0 0
  1. (*
  2. # Sys.ocaml_version ;;
  3. - : string = "4.02.3"
  4. *)
  5.  
  6. let margfn ff =
  7.   let oldmarg = Format.pp_get_margin ff () in
  8.   Printf.printf "pp_get_margin before = %d\n" oldmarg ;
  9.   Format.pp_set_margin ff max_int ;
  10.   Printf.printf "pp_get_margin after = %d\n" (Format.pp_get_margin ff ())
  11.  
  12. (*
  13. # margfn Format.std_formatter ;;
  14. pp_get_margin before = 78
  15. pp_get_margin after = 1000000009
  16. - : unit = ()
  17. *)
  18.  
  19. let maxindfn ff =
  20.   let oldmaxind = Format.pp_get_max_indent ff () in
  21.   Printf.printf "pp_get_max_indent before = %d\n" oldmaxind ;
  22.   Format.pp_set_max_indent ff max_int ;
  23.   Printf.printf "pp_get_max_indent after = %d\n" (Format.pp_get_max_indent ff ())
  24.  
  25. (*
  26. # maxindfn Format.std_formatter ;;
  27. pp_get_max_indent before = 68
  28. pp_get_max_indent after = 68
  29. - : unit = ()
  30. *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement