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

« back to all changes in this revision

Viewing changes to Examples/modula3/simple/example.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2005-01-10 09:48:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050110094852-axi555axhj1brbwq
Tags: 1.3.22-5ubuntu2
Build using python2.4 and pike7.6. Closes: #4146.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* File : example.c */
 
2
 
 
3
/* A global variable */
 
4
double Foo = 3.0;
 
5
 
 
6
/* Compute the greatest common divisor of positive integers */
 
7
int gcd(int x, int y) {
 
8
  int g;
 
9
  g = y;
 
10
  while (x > 0) {
 
11
    g = x;
 
12
    x = y % x;
 
13
    y = g;
 
14
  }
 
15
  return g;
 
16
}
 
17
 
 
18