new example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5268 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e7a74c2646
commit
8ed7e36a20
10 changed files with 472 additions and 0 deletions
19
Examples/python/contract/example.i
Normal file
19
Examples/python/contract/example.i
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* File : example.i */
|
||||
%module example
|
||||
|
||||
%contract gcd(int x, int y) {
|
||||
require:
|
||||
x >= 0;
|
||||
y >= 0;
|
||||
}
|
||||
|
||||
%contract fact(int n) {
|
||||
require:
|
||||
n >= 0;
|
||||
ensure:
|
||||
fact >= 1;
|
||||
}
|
||||
|
||||
extern int gcd(int x, int y);
|
||||
extern int fact(int n);
|
||||
extern double Foo;
|
||||
Loading…
Add table
Add a link
Reference in a new issue