/tags/rel-1-3-25/SWIG/Examples/tcl/contract/example.i
Swig | 19 lines | 15 code | 3 blank | 1 comment | 0 complexity | fdfdb2c023e58f5bb111fc66e86180e5 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /* 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;