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:
|
These options can be displayed with:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="code"><pre>
|
<div class="shell"><pre>
|
||||||
swig -scilab -help
|
$ swig -scilab -help
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -388,12 +388,12 @@ In Scilab, parameters are passed by value. The output (and inout) parameters are
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="targetlang"><pre>
|
<div class="targetlang"><pre>
|
||||||
-->sub(5, 3)
|
--> sub(5, 3)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
2.
|
2.
|
||||||
|
|
||||||
-->inc(4, 3)
|
--> inc(4, 3)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
7.
|
7.
|
||||||
|
|
@ -432,7 +432,7 @@ int divide(int n, int d, int q*, int *r) {
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<div class="targetlang"><pre>
|
<div class="targetlang"><pre>
|
||||||
-->[ret, q, r] = divide(20, 6)
|
--> [ret, q, r] = divide(20, 6)
|
||||||
r =
|
r =
|
||||||
|
|
||||||
2.
|
2.
|
||||||
|
|
@ -1115,24 +1115,24 @@ Then in Scilab:
|
||||||
|
|
||||||
<div class="targetlang">
|
<div class="targetlang">
|
||||||
<pre>
|
<pre>
|
||||||
-->t = new_IntTriplet(3, 4, 1);
|
--> t = new_IntTriplet(3, 4, 1);
|
||||||
|
|
||||||
-->IntTriplet_first_get(t)
|
--> IntTriplet_first_get(t)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
3.
|
3.
|
||||||
|
|
||||||
-->IntTriplet_second_get(t)
|
--> IntTriplet_second_get(t)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
4.
|
4.
|
||||||
|
|
||||||
-->IntTriplet_third_get(t)
|
--> IntTriplet_third_get(t)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
1.
|
1.
|
||||||
|
|
||||||
-->delete_IntTriplet(t);
|
--> delete_IntTriplet(t);
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1180,11 +1180,11 @@ private:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<div class="targetlang"><pre>
|
<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 =
|
ans =
|
||||||
|
|
||||||
4.
|
4.
|
||||||
|
|
@ -1231,14 +1231,14 @@ In Scilab, there is no need to the specify the <tt>Foo</tt> namespace:
|
||||||
|
|
||||||
<div class="targetlang">
|
<div class="targetlang">
|
||||||
<pre>
|
<pre>
|
||||||
-->fact(3)
|
--> fact(3)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
6.
|
6.
|
||||||
|
|
||||||
-->v = new_Vector();
|
--> v = new_Vector();
|
||||||
-->Vector_x_set(v, 3.4);
|
--> Vector_x_set(v, 3.4);
|
||||||
-->Vector_y_get(v)
|
--> Vector_y_get(v)
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
0.
|
0.
|
||||||
|
|
@ -1302,12 +1302,12 @@ It can be used with the <tt>lasterror()</tt> function as following:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<div class="targetlang"><pre>
|
<div class="targetlang"><pre>
|
||||||
-->execstr('throw_exception()', 'errcatch');
|
--> execstr('throw_exception()', 'errcatch');
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
999.
|
999.
|
||||||
|
|
||||||
-->lasterror()
|
--> lasterror()
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
SWIG/Scilab: Exception (char const *) occured: Bye world !
|
SWIG/Scilab: Exception (char const *) occured: Bye world !
|
||||||
|
|
@ -1338,7 +1338,7 @@ void throw_stl_invalid_arg(int i) throw(std::invalid_argument) {
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<div class="targetlang"><pre>
|
<div class="targetlang"><pre>
|
||||||
-->throw_int();
|
--> throw_int();
|
||||||
!--error 999
|
!--error 999
|
||||||
SWIG/Scilab: Exception (int) occured: 12
|
SWIG/Scilab: Exception (int) occured: 12
|
||||||
|
|
||||||
|
|
@ -1462,7 +1462,7 @@ void printArray(int values[], int len) {
|
||||||
--> printArray([0 1 2 3], 4)
|
--> printArray([0 1 2 3], 4)
|
||||||
[ 0 1 2 3 ]
|
[ 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 ]
|
[ 0 -1 2 3 ]
|
||||||
|
|
||||||
--> printArray([0 1; 2 3], 4)
|
--> printArray([0 1; 2 3], 4)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue