Initial revision.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@364 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f8ce6dc9ce
commit
e0e54b762a
5 changed files with 97 additions and 0 deletions
21
Examples/guile/simple/example.c
Normal file
21
Examples/guile/simple/example.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* Simple example from documentation */
|
||||
/* File : example.c */
|
||||
|
||||
#include </usr/include/time.h>
|
||||
|
||||
double My_variable = 3.0;
|
||||
|
||||
int fact(int n) {
|
||||
if (n <= 1) return 1;
|
||||
else return n*fact(n-1);
|
||||
}
|
||||
|
||||
int mod(int n, int m) {
|
||||
return (n % m);
|
||||
}
|
||||
|
||||
char *get_time() {
|
||||
long ltime;
|
||||
time(<ime);
|
||||
return ctime(<ime);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue