Added contract example.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5375 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5969a1c272
commit
2e96036cdb
4 changed files with 59 additions and 0 deletions
7
Examples/ocaml/contract/example_prog.ml
Normal file
7
Examples/ocaml/contract/example_prog.ml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
open Swig
|
||||
open Example
|
||||
|
||||
let _ = print_endline "This won't throw."
|
||||
let _ = Printf.printf "Cos 1.0 is %f\n" (_cos '(1.0) as float)
|
||||
let _ = print_endline "This will throw."
|
||||
let _ = Printf.printf "Cos 5.0 is %f\n" (_cos '(5.0) as float)
|
||||
Loading…
Add table
Add a link
Reference in a new issue