projects
/
profile
/
ivi
/
swig.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upstream version 1.3.40
[profile/ivi/swig.git]
/
Examples
/
guile
/
simple
/
example.c
1
/* Simple example from documentation */
2
/* File : example.c */
3
4
#include <time.h>
5
6
double My_variable = 3.0;
7
8
int fact(int n) {
9
if (n <= 1) return 1;
10
else return n*fact(n-1);
11
}
12
13
int mod(int n, int m) {
14
return (n % m);
15
}
16
17
char *get_time() {
18
long ltime;
19
time(<ime);
20
return ctime(<ime);
21
}