From 33fba2020b16a22afb0a6b4d23effcfc401d2c49 Mon Sep 17 00:00:00 2001
From: Simon Marchetto
-swig -scilab -help +@@ -388,12 +388,12 @@ In Scilab, parameters are passed by value. The output (and inout) parameters are+$ swig -scilab -help--->sub(5, 3) +--> sub(5, 3) ans = 2. --->inc(4, 3) +--> inc(4, 3) ans = 7. @@ -432,7 +432,7 @@ int divide(int n, int d, int q*, int *r) {
--->[ret, q, r] = divide(20, 6) +--> [ret, q, r] = divide(20, 6) r = 2. @@ -1115,24 +1115,24 @@ Then in Scilab:@@ -1180,11 +1180,11 @@ private:--->t = new_IntTriplet(3, 4, 1); +--> t = new_IntTriplet(3, 4, 1); --->IntTriplet_first_get(t) +--> IntTriplet_first_get(t) ans = 3. --->IntTriplet_second_get(t) +--> IntTriplet_second_get(t) ans = 4. --->IntTriplet_third_get(t) +--> IntTriplet_third_get(t) ans = 1. --->delete_IntTriplet(t); +--> delete_IntTriplet(t);
--->c1 = new_Complex(3, 7); +--> c1 = new_Complex(3, 7); --->c2 = Complex_plus(c, new_Complex(1,1)); +--> c2 = Complex_plus(c, new_Complex(1,1)); --->Complex_toDouble(c2) +--> Complex_toDouble(c2) ans = 4. @@ -1231,14 +1231,14 @@ In Scilab, there is no need to the specify the Foo namespace:--->fact(3) +--> fact(3) ans = 6. --->v = new_Vector(); --->Vector_x_set(v, 3.4); --->Vector_y_get(v) +--> v = new_Vector(); +--> Vector_x_set(v, 3.4); +--> Vector_y_get(v) ans = 0. @@ -1302,12 +1302,12 @@ It can be used with the lasterror() function as following:
--->execstr('throw_exception()', 'errcatch'); +--> execstr('throw_exception()', 'errcatch'); ans = 999. --->lasterror() +--> lasterror() ans = SWIG/Scilab: Exception (char const *) occured: Bye world ! @@ -1338,7 +1338,7 @@ void throw_stl_invalid_arg(int i) throw(std::invalid_argument) {
--->throw_int(); +--> throw_int(); !--error 999 SWIG/Scilab: Exception (int) occured: 12 @@ -1462,7 +1462,7 @@ void printArray(int values[], int len) { --> printArray([0 1 2 3], 4) [ 0 1 2 3 ] --->printArray([0.2; -1.8; 2; 3.7], 4) +--> printArray([0.2; -1.8; 2; 3.7], 4) [ 0 -1 2 3 ] --> printArray([0 1; 2 3], 4)