scilab: remove constants tests from example

This commit is contained in:
Simon Marchetto 2014-02-17 16:29:11 +01:00
commit 4aa870c318
2 changed files with 9 additions and 35 deletions

View file

@ -1,29 +1,17 @@
/* File : example.i */
%module example
/* Forces to wrap constants as Scilab variables (instead of functions) */
/* Wraps constants as Scilab variables (instead of getter functions) */
%scilabconst(1);
#define ICONST 42
#define FCONST 2.1828
#define CCONST 'x'
#define CCONST2 '\n'
#define SCONST "Hello World"
#define SCONST2 "\"Hello World\""
#define ICONST 42
#define FCONST 2.1828
#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 directives also produce constants */
// Constants expressions are also accepted
#define EXPR ICONST + 3*FCONST
// SWIG also offers to define constants
%constant int iconst = 37;
%constant double fconst = 3.14;
%constant double fconst = 42.2;