PageRenderTime 81ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/ocaml/contract/example_prog.ml

#
OCaml | 7 lines | 6 code | 1 blank | 0 comment | 0 complexity | 1f8d2fb9e45af51b2f640a009efc1d5f MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. open Swig
  2. open Example
  3. let _ = print_endline "This won't throw."
  4. let _ = Printf.printf "Cos 1.0 is %f\n" (_cos '(1.0) as float)
  5. let _ = print_endline "This will throw."
  6. let _ = Printf.printf "Cos 5.0 is %f\n" (_cos '(5.0) as float)