scilab: test enum example, source renamed
This commit is contained in:
parent
bf2a71ec7d
commit
7c1899a458
3 changed files with 24 additions and 1 deletions
23
Examples/scilab/contract/example1.c
Normal file
23
Examples/scilab/contract/example1.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* 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;
|
||||
}
|
||||
|
||||
int fact(int n) {
|
||||
if (n <= 0) return 1;
|
||||
return n*fact(n-1);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
TOP = ../..
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
SRCS = example.c
|
||||
SRCS = example1.c
|
||||
TARGET = example_wrap.c
|
||||
INTERFACE = example.i
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue