From d8a05942543ee46294f74b60925171832c3db31d Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Thu, 24 Jul 2014 15:38:49 +0200 Subject: [PATCH] scilab: constants example same as in other languages --- Examples/scilab/constants/example.i | 3 --- Examples/scilab/constants/runme.sci | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Examples/scilab/constants/example.i b/Examples/scilab/constants/example.i index 36e6d83c1..3b45011af 100644 --- a/Examples/scilab/constants/example.i +++ b/Examples/scilab/constants/example.i @@ -1,9 +1,6 @@ /* File : example.i */ %module example -/* Wraps constants as Scilab variables (instead of getter functions) */ -%scilabconst(1); - #define ICONST 42 #define FCONST 2.1828 #define SCONST "Hello World" diff --git a/Examples/scilab/constants/runme.sci b/Examples/scilab/constants/runme.sci index 9b83a004c..cfccb7f1e 100644 --- a/Examples/scilab/constants/runme.sci +++ b/Examples/scilab/constants/runme.sci @@ -4,11 +4,11 @@ exec loader.sce; example_Init(); printf("\nConstants are wrapped by functions:\n"); -printf("ICONST = %i (should be 42)\n", ICONST); -printf("FCONST = %5.4f (should be 2.1828)\n", FCONST); -printf("SCONST = ''%s'' (should be ''Hello World'')\n", SCONST); -printf("EXPR = %5.4f (should be 48.5484)\n", EXPR); -printf("iconst = %i (should be 37)\n", iconst); -printf("fconst = %3.2f (should be 42.20)\n", fconst); +printf("ICONST_get() = %i (should be 42)\n", ICONST_get()); +printf("FCONST_get() = %5.4f (should be 2.1828)\n", FCONST_get()); +printf("SCONST_get() = ''%s'' (should be ''Hello World'')\n", SCONST_get()); +printf("EXPR_get() = %5.4f (should be 48.5484)\n", EXPR_get()); +printf("iconst_get() = %i (should be 37)\n", iconst_get()); +printf("fconst_get() = %3.2f (should be 42.20)\n", fconst_get()); exit