/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

  1. /* File : example.i */
  2. %module example
  3. %contract gcd(int x, int y) {
  4. require:
  5. x >= 0;
  6. y >= 0;
  7. }
  8. %contract fact(int n) {
  9. require:
  10. n >= 0;
  11. ensure:
  12. fact >= 1;
  13. }
  14. extern int gcd(int x, int y);
  15. extern int fact(int n);
  16. extern double Foo;