scilab: other doc minor fixes
This commit is contained in:
parent
7c9a9aee70
commit
33fba2020b
1 changed files with 21 additions and 21 deletions
|
|
@ -291,8 +291,8 @@ The following table lists the Scilab specific command line options in addition t
|
|||
These options can be displayed with:
|
||||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
swig -scilab -help
|
||||
<div class="shell"><pre>
|
||||
$ swig -scilab -help
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
|
@ -388,12 +388,12 @@ In Scilab, parameters are passed by value. The output (and inout) parameters are
|
|||
</p>
|
||||
|
||||
<div class="targetlang"><pre>
|
||||
-->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) {
|
|||
|
||||
<p>
|
||||
<div class="targetlang"><pre>
|
||||
-->[ret, q, r] = divide(20, 6)
|
||||
--> [ret, q, r] = divide(20, 6)
|
||||
r =
|
||||
|
||||
2.
|
||||
|
|
@ -1115,24 +1115,24 @@ Then in Scilab:
|
|||
|
||||
<div class="targetlang">
|
||||
<pre>
|
||||
-->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);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
@ -1180,11 +1180,11 @@ private:
|
|||
|
||||
<p>
|
||||
<div class="targetlang"><pre>
|
||||
-->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 <tt>Foo</tt> namespace:
|
|||
|
||||
<div class="targetlang">
|
||||
<pre>
|
||||
-->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 <tt>lasterror()</tt> function as following:
|
|||
|
||||
<p>
|
||||
<div class="targetlang"><pre>
|
||||
-->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) {
|
|||
|
||||
<p>
|
||||
<div class="targetlang"><pre>
|
||||
-->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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue