More examples

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@491 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-06-17 23:46:23 +00:00
commit f57e77299b
10 changed files with 326 additions and 41 deletions

View file

@ -0,0 +1,24 @@
/* File : example.i */
%module example
/* A few preprocessor macros */
#define ICONST 42
#define FCONST 2.1828
#define CCONST 'x'
#define SCONST "Hello World"
/* This should work just fine */
#define EXPR ICONST + 3*(FCONST)
/* This shouldn't do anything */
#define EXTERN extern
/* Neither should this (BAR isn't defined) */
#define FOO (ICONST + BAR)
/* The following statements also produce constants */
const int iconst = 37;
const double fconst = 3.14;