~ubuntu-branches/ubuntu/hoary/swig1.3/hoary

« back to all changes in this revision

Viewing changes to Examples/contract/simple_c/example.i

  • Committer: Bazaar Package Importer
  • Author(s): Thom May
  • Date: 2004-08-02 15:57:10 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040802155710-bm292q1d6x6tw7gc
Tags: 1.3.21-5ubuntu1
Fix linking for ruby, python, perl and tcl bindings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* File : example.i */
 
2
 
 
3
/* Basic C example for swig contract */
 
4
/* Tiger, University of Chicago, 2003 */
 
5
 
 
6
%module example
 
7
 
 
8
%contract Circle (int x, int y, int radius) {
 
9
require:
 
10
     x      >= 0;
 
11
     y      >= 0;
 
12
     radius >  x;
 
13
ensure:
 
14
     Circle >= 0;
 
15
}
 
16
 
 
17
extern int Circle (int x, int y, int radius);