swig/Examples/guile/simple/example.c
William S Fulton de23343739 Standardise Guile simple example
Changes so that it works the same as other language modules
2019-02-09 14:44:33 +00:00

18 lines
247 B
C

/* File : example.c */
/* A global variable */
double Foo = 3.0;
/* Compute the greatest common divisor of positive integers */
int gcd(int x, int y) {
int g;
g = y;
while (x > 0) {
g = x;
x = y % x;
y = g;
}
return g;
}