[doc] misc. patchs & small improvements
[scilab.git] / scilab / modules / api_scilab / help / en_US / F_integer.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2015  - Scilab Enterprises - Antoine ELIAS
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19           xmlns:scilab="http://www.scilab.org" xml:id="api_integer" xml:lang="en">
20     <refnamediv>
21         <refname>API integer functions</refname>
22         <para>This page lists all the functions to manipulate Scilab native objects containing integers</para>
23         <para></para>
24     </refnamediv>
25     <refsynopsisdiv>
26         <refsection id="api_integer_scilab_getIntegerPrecision">
27             <literal>
28                 <link linkend="api_types_scilabVar">
29                     <command>scilabVar</command>
30                 </link>
31                 <varname>scilab_getIntegerPrecision</varname>(
32                 <link linkend="api_types_scilabEnv">
33                     <command>scilabEnv</command>
34                 </link>
35                 env,
36                 <link linkend="api_types_scilabVar">
37                     <command>scilabVar</command>
38                 </link>
39                 var)
40             </literal>
41             <para>
42                 Return precision of an integer variable <varname>var</varname>.
43             </para>
44         </refsection>
45         <refsection id="api_integer_scilab_isInt">
46             <literal>
47                 int <varname>scilab_isInt8</varname>(
48                 <link linkend="api_types_scilabEnv">
49                     <command>scilabEnv</command>
50                 </link>
51                 env,
52                 <link linkend="api_types_scilabVar">
53                     <command>scilabVar</command>
54                 </link>
55                 var)
56             </literal>
57             <para/>
58             <literal>
59                 int <varname>scilab_isInt16</varname>(
60                 <link linkend="api_types_scilabEnv">
61                     <command>scilabEnv</command>
62                 </link>
63                 env,
64                 <link linkend="api_types_scilabVar">
65                     <command>scilabVar</command>
66                 </link>
67                 var)
68             </literal>
69             <para/>
70             <literal>
71                 int <varname>scilab_isInt32</varname>(
72                 <link linkend="api_types_scilabEnv">
73                     <command>scilabEnv</command>
74                 </link>
75                 env,
76                 <link linkend="api_types_scilabVar">
77                     <command>scilabVar</command>
78                 </link>
79                 var)
80             </literal>
81             <para/>
82             <literal>
83                 int <varname>scilab_isInt64</varname>(
84                 <link linkend="api_types_scilabEnv">
85                     <command>scilabEnv</command>
86                 </link>
87                 env,
88                 <link linkend="api_types_scilabVar">
89                     <command>scilabVar</command>
90                 </link>
91                 var)
92             </literal>
93             <para/>
94             <literal>
95                 int <varname>scilab_isUnsignedInt8</varname>(
96                 <link linkend="api_types_scilabEnv">
97                     <command>scilabEnv</command>
98                 </link>
99                 env,
100                 <link linkend="api_types_scilabVar">
101                     <command>scilabVar</command>
102                 </link>
103                 var)
104             </literal>
105             <para/>
106             <literal>
107                 int <varname>scilab_isUnsignedInt16</varname>(
108                 <link linkend="api_types_scilabEnv">
109                     <command>scilabEnv</command>
110                 </link>
111                 env,
112                 <link linkend="api_types_scilabVar">
113                     <command>scilabVar</command>
114                 </link>
115                 var)
116             </literal>
117             <para/>
118             <literal>
119                 int <varname>scilab_isUnsignedInt32</varname>(
120                 <link linkend="api_types_scilabEnv">
121                     <command>scilabEnv</command>
122                 </link>
123                 env,
124                 <link linkend="api_types_scilabVar">
125                     <command>scilabVar</command>
126                 </link>
127                 var)
128             </literal>
129             <para/>
130             <literal>
131                 int <varname>scilab_isUnsignedInt64</varname>(
132                 <link linkend="api_types_scilabEnv">
133                     <command>scilabEnv</command>
134                 </link>
135                 env,
136                 <link linkend="api_types_scilabVar">
137                     <command>scilabVar</command>
138                 </link>
139                 var)
140             </literal>
141             <para>
142                 Return 1 if variable <varname>val</varname> is an integer otherwise 0. Precision is specified in function name.
143             </para>
144         </refsection>
145         <refsection id="api_integer_scilab_createInteger">
146             <literal>
147                 <link linkend="api_types_scilabVar">
148                     <command>scilabVar</command>
149                 </link>
150                 <varname>scilab_createInteger8</varname>(
151                 <link linkend="api_types_scilabEnv">
152                     <command>scilabEnv</command>
153                 </link>
154                 env, char val)
155             </literal>
156             <para/>
157             <literal>
158                 <link linkend="api_types_scilabVar">
159                     <command>scilabVar</command>
160                 </link>
161                 <varname>scilab_createInteger16</varname>(
162                 <link linkend="api_types_scilabEnv">
163                     <command>scilabEnv</command>
164                 </link>
165                 env, short val)
166             </literal>
167             <para/>
168             <literal>
169                 <link linkend="api_types_scilabVar">
170                     <command>scilabVar</command>
171                 </link>
172                 <varname>scilab_createInteger32</varname>(
173                 <link linkend="api_types_scilabEnv">
174                     <command>scilabEnv</command>
175                 </link>
176                 env, int val)
177             </literal>
178             <para/>
179             <literal>
180                 <link linkend="api_types_scilabVar">
181                     <command>scilabVar</command>
182                 </link>
183                 <varname>scilab_createInteger64</varname>(
184                 <link linkend="api_types_scilabEnv">
185                     <command>scilabEnv</command>
186                 </link>
187                 env, long long val)
188             </literal>
189             <para/>
190             <literal>
191                 <link linkend="api_types_scilabVar">
192                     <command>scilabVar</command>
193                 </link>
194                 <varname>scilab_createUnsignedInteger8</varname>(
195                 <link linkend="api_types_scilabEnv">
196                     <command>scilabEnv</command>
197                 </link>
198                 env, unsigned char val)
199             </literal>
200             <para/>
201             <literal>
202                 <link linkend="api_types_scilabVar">
203                     <command>scilabVar</command>
204                 </link>
205                 <varname>scilab_createUnsignedInteger16</varname>(
206                 <link linkend="api_types_scilabEnv">
207                     <command>scilabEnv</command>
208                 </link>
209                 env, unsigned short val)
210             </literal>
211             <para/>
212             <literal>
213                 <link linkend="api_types_scilabVar">
214                     <command>scilabVar</command>
215                 </link>
216                 <varname>scilab_createUnsignedInteger32</varname>(
217                 <link linkend="api_types_scilabEnv">
218                     <command>scilabEnv</command>
219                 </link>
220                 env, unsigned int val)
221             </literal>
222             <para/>
223             <literal>
224                 <link linkend="api_types_scilabVar">
225                     <command>scilabVar</command>
226                 </link>
227                 <varname>scilab_createUnsignedInteger64</varname>(
228                 <link linkend="api_types_scilabEnv">
229                     <command>scilabEnv</command>
230                 </link>
231                 env, unsigned long long val)
232             </literal>
233             <para>
234                 Create a scalar integer from <varname>val</varname>. Precision is specified in function name.
235             </para>
236         </refsection>
237         <refsection id="api_integer_scilab_createIntegerMatrix">
238             <literal>
239                 <link linkend="api_types_scilabVar">
240                     <command>scilabVar</command>
241                 </link>
242                 <varname>scilab_createIntegerMatrix</varname>(
243                 <link linkend="api_types_scilabEnv">
244                     <command>scilabEnv</command>
245                 </link>
246                 env, int prec, int dim, const int* dims)
247             </literal>
248             <para>
249                 Create an integer matrix with <varname>dim</varname> dimensions (<varname>dims</varname>[0], <varname>dims</varname>[1], ..., <varname>dims</varname>[<varname>dim</varname>-1]).
250             </para>
251             <para>
252                 The <varname>prec</varname> parameter specifies the integer precision :
253             <table>
254                 <tr>
255                 <td>
256                     <table>
257                         <tr><td><emphasis role="bold">SCI_INT8</emphasis></td><td>: integer 8-bits</td></tr>
258                         <tr><td><emphasis role="bold">SCI_INT16</emphasis></td><td>: Integer 16-bits</td></tr>
259                         <tr><td><emphasis role="bold">SCI_INT32</emphasis></td><td>: Integer 32-bits</td></tr>
260                         <tr><td><emphasis role="bold">SCI_INT64</emphasis></td><td>: Integer 64-bits</td></tr>
261                     </table>
262                 </td>
263                 <td>
264                 </td>
265                 <td>
266                     <table>
267                         <tr><td><emphasis role="bold">SCI_UINT8</emphasis></td><td>: Unsigned integer 8-bits</td></tr>
268                         <tr><td><emphasis role="bold">SCI_UINT16</emphasis></td><td>: Unsigned integer 16-bits</td></tr>
269                         <tr><td><emphasis role="bold">SCI_UINT32</emphasis></td><td>: Unsigned integer 32-bits</td></tr>
270                         <tr><td><emphasis role="bold">SCI_UINT64</emphasis></td><td>: Unsigned integer 64-bits</td></tr>
271                     </table>
272                 </td>
273                 </tr>
274             </table>
275             </para>
276         </refsection>
277         <refsection id="api_integer_scilab_createIntegerXXMatrix">
278             <literal>
279                 <link linkend="api_types_scilabVar">
280                     <command>scilabVar</command>
281                 </link>
282                 <varname>scilab_createInteger8Matrix</varname>(
283                 <link linkend="api_types_scilabEnv">
284                     <command>scilabEnv</command>
285                 </link>
286                 env, int prec, int dim, const int* dims)
287             </literal>
288             <para/>
289             <literal>
290                 <link linkend="api_types_scilabVar">
291                     <command>scilabVar</command>
292                 </link>
293                 <varname>scilab_createInteger16Matrix</varname>(
294                 <link linkend="api_types_scilabEnv">
295                     <command>scilabEnv</command>
296                 </link>
297                 env, int prec, int dim, const int* dims)
298             </literal>
299             <para/>
300             <literal>
301                 <link linkend="api_types_scilabVar">
302                     <command>scilabVar</command>
303                 </link>
304                 <varname>scilab_createInteger32Matrix</varname>(
305                 <link linkend="api_types_scilabEnv">
306                     <command>scilabEnv</command>
307                 </link>
308                 env, int prec, int dim, const int* dims)
309             </literal>
310             <para/>
311             <literal>
312                 <link linkend="api_types_scilabVar">
313                     <command>scilabVar</command>
314                 </link>
315                 <varname>scilab_createInteger64Matrix</varname>(
316                 <link linkend="api_types_scilabEnv">
317                     <command>scilabEnv</command>
318                 </link>
319                 env, int prec, int dim, const int* dims)
320             </literal>
321             <para/>
322             <literal>
323                 <link linkend="api_types_scilabVar">
324                     <command>scilabVar</command>
325                 </link>
326                 <varname>scilab_createUnsignedInteger8Matrix</varname>(
327                 <link linkend="api_types_scilabEnv">
328                     <command>scilabEnv</command>
329                 </link>
330                 env, int prec, int dim, const int* dims)
331             </literal>
332             <para/>
333             <literal>
334                 <link linkend="api_types_scilabVar">
335                     <command>scilabVar</command>
336                 </link>
337                 <varname>scilab_createUnsignedInteger16Matrix</varname>(
338                 <link linkend="api_types_scilabEnv">
339                     <command>scilabEnv</command>
340                 </link>
341                 env, int prec, int dim, const int* dims)
342             </literal>
343             <para/>
344             <literal>
345                 <link linkend="api_types_scilabVar">
346                     <command>scilabVar</command>
347                 </link>
348                 <varname>scilab_createUnsignedInteger32Matrix</varname>(
349                 <link linkend="api_types_scilabEnv">
350                     <command>scilabEnv</command>
351                 </link>
352                 env, int prec, int dim, const int* dims)
353             </literal>
354             <para/>
355             <literal>
356                 <link linkend="api_types_scilabVar">
357                     <command>scilabVar</command>
358                 </link>
359                 <varname>scilab_createUnsignedInteger64Matrix</varname>(
360                 <link linkend="api_types_scilabEnv">
361                     <command>scilabEnv</command>
362                 </link>
363                 env, int prec, int dim, const int* dims)
364             </literal>
365             <para>
366                 Create an integer matrix with <varname>dim</varname> dimensions (<varname>dims</varname>[0], <varname>dims</varname>[1], ..., <varname>dims</varname>[<varname>dim</varname>-1]). Precision is specified in function name.
367             </para>
368         </refsection>
369         <refsection id="api_integer_scilab_createIntegerMatrix2d">
370             <literal>
371                 <link linkend="api_types_scilabVar">
372                     <command>scilabVar</command>
373                 </link>
374                 <varname>scilab_createIntegerMatrix2d</varname>(
375                 <link linkend="api_types_scilabEnv">
376                     <command>scilabEnv</command>
377                 </link>
378                 env, int prec, int row, int col)
379             </literal>
380             <para>
381                 Create an integer matrix with 2 dimensions (<varname>row</varname>, <varname>col</varname>).
382             </para>
383             <para>
384                 <varname>prec</varname> parameter give precision.
385             </para>
386         </refsection>
387         <refsection id="api_integer_scilab_createIntegerXXMatrix2d">
388             <literal>
389                 <link linkend="api_types_scilabVar">
390                     <command>scilabVar</command>
391                 </link>
392                 <varname>scilab_createInteger8Matrix2d</varname>(
393                 <link linkend="api_types_scilabEnv">
394                     <command>scilabEnv</command>
395                 </link>
396                 env, int row, int col)
397             </literal>
398             <para/>
399             <literal>
400                 <link linkend="api_types_scilabVar">
401                     <command>scilabVar</command>
402                 </link>
403                 <varname>scilab_createInteger16Matrix2d</varname>(
404                 <link linkend="api_types_scilabEnv">
405                     <command>scilabEnv</command>
406                 </link>
407                 env, int row, int col)
408             </literal>
409             <para/>
410             <literal>
411                 <link linkend="api_types_scilabVar">
412                     <command>scilabVar</command>
413                 </link>
414                 <varname>scilab_createInteger32Matrix2d</varname>(
415                 <link linkend="api_types_scilabEnv">
416                     <command>scilabEnv</command>
417                 </link>
418                 env, int row, int col)
419             </literal>
420             <para/>
421             <literal>
422                 <link linkend="api_types_scilabVar">
423                     <command>scilabVar</command>
424                 </link>
425                 <varname>scilab_createInteger64Matrix2d</varname>(
426                 <link linkend="api_types_scilabEnv">
427                     <command>scilabEnv</command>
428                 </link>
429                 env, int row, int col)
430             </literal>
431             <para/>
432             <literal>
433                 <link linkend="api_types_scilabVar">
434                     <command>scilabVar</command>
435                 </link>
436                 <varname>scilab_createUnsignedInteger8Matrix2d</varname>(
437                 <link linkend="api_types_scilabEnv">
438                     <command>scilabEnv</command>
439                 </link>
440                 env, int row, int col)
441             </literal>
442             <para/>
443             <literal>
444                 <link linkend="api_types_scilabVar">
445                     <command>scilabVar</command>
446                 </link>
447                 <varname>scilab_createUnsignedInteger16Matrix2d</varname>(
448                 <link linkend="api_types_scilabEnv">
449                     <command>scilabEnv</command>
450                 </link>
451                 env, int row, int col)
452             </literal>
453             <para/>
454             <literal>
455                 <link linkend="api_types_scilabVar">
456                     <command>scilabVar</command>
457                 </link>
458                 <varname>scilab_createUnsignedInteger32Matrix2d</varname>(
459                 <link linkend="api_types_scilabEnv">
460                     <command>scilabEnv</command>
461                 </link>
462                 env, int row, int col)
463             </literal>
464             <para/>
465             <literal>
466                 <link linkend="api_types_scilabVar">
467                     <command>scilabVar</command>
468                 </link>
469                 <varname>scilab_createUnsignedInteger64Matrix2d</varname>(
470                 <link linkend="api_types_scilabEnv">
471                     <command>scilabEnv</command>
472                 </link>
473                 env, int row, int col)
474             </literal>
475             <para>
476                 Create an integer matrix with 2 dimensions (<varname>row</varname>, <varname>col</varname>). Precision is specified in function name.
477             </para>
478         </refsection>
479         <refsection id="api_integer_scilab_getInteger">
480             <literal>
481                 <link linkend="api_types_scilabStatus">
482                     <command>scilabStatus</command>
483                 </link>
484                 <varname>scilab_getInteger8</varname>(
485                 <link linkend="api_types_scilabEnv">
486                     <command>scilabEnv</command>
487                 </link>
488                 env,
489                 <link linkend="api_types_scilabVar">
490                     <command>scilabVar</command>
491                 </link>
492                 var, char* vals)
493             </literal>
494             <para/>
495             <literal>
496                 <link linkend="api_types_scilabStatus">
497                     <command>scilabStatus</command>
498                 </link>
499                 <varname>scilab_getInteger16</varname>(
500                 <link linkend="api_types_scilabEnv">
501                     <command>scilabEnv</command>
502                 </link>
503                 env,
504                 <link linkend="api_types_scilabVar">
505                     <command>scilabVar</command>
506                 </link>
507                 var, short* vals)
508             </literal>
509             <para/>
510             <literal>
511                 <link linkend="api_types_scilabStatus">
512                     <command>scilabStatus</command>
513                 </link>
514                 <varname>scilab_getInteger32</varname>(
515                 <link linkend="api_types_scilabEnv">
516                     <command>scilabEnv</command>
517                 </link>
518                 env,
519                 <link linkend="api_types_scilabVar">
520                     <command>scilabVar</command>
521                 </link>
522                 var, int* vals)
523             </literal>
524             <para/>
525             <literal>
526                 <link linkend="api_types_scilabStatus">
527                     <command>scilabStatus</command>
528                 </link>
529                 <varname>scilab_getInteger64</varname>(
530                 <link linkend="api_types_scilabEnv">
531                     <command>scilabEnv</command>
532                 </link>
533                 env,
534                 <link linkend="api_types_scilabVar">
535                     <command>scilabVar</command>
536                 </link>
537                 var, long long* vals)
538             </literal>
539             <para/>
540             <literal>
541                 <link linkend="api_types_scilabStatus">
542                     <command>scilabStatus</command>
543                 </link>
544                 <varname>scilab_getUnsignedInteger8</varname>(
545                 <link linkend="api_types_scilabEnv">
546                     <command>scilabEnv</command>
547                 </link>
548                 env,
549                 <link linkend="api_types_scilabVar">
550                     <command>scilabVar</command>
551                 </link>
552                 var, unsigned char* vals)
553             </literal>
554             <para/>
555             <literal>
556                 <link linkend="api_types_scilabStatus">
557                     <command>scilabStatus</command>
558                 </link>
559                 <varname>scilab_getUnsignedInteger16</varname>(
560                 <link linkend="api_types_scilabEnv">
561                     <command>scilabEnv</command>
562                 </link>
563                 env,
564                 <link linkend="api_types_scilabVar">
565                     <command>scilabVar</command>
566                 </link>
567                 var, unsigned short* vals)
568             </literal>
569             <para/>
570             <literal>
571                 <link linkend="api_types_scilabStatus">
572                     <command>scilabStatus</command>
573                 </link>
574                 <varname>scilab_getUnsignedInteger32</varname>(
575                 <link linkend="api_types_scilabEnv">
576                     <command>scilabEnv</command>
577                 </link>
578                 env,
579                 <link linkend="api_types_scilabVar">
580                     <command>scilabVar</command>
581                 </link>
582                 var, unsigned int* vals)
583             </literal>
584             <para/>
585             <literal>
586                 <link linkend="api_types_scilabStatus">
587                     <command>scilabStatus</command>
588                 </link>
589                 <varname>scilab_getUnsignedInteger64</varname>(
590                 <link linkend="api_types_scilabEnv">
591                     <command>scilabEnv</command>
592                 </link>
593                 env,
594                 <link linkend="api_types_scilabVar">
595                     <command>scilabVar</command>
596                 </link>
597                 var, unsigned long long* vals)
598             </literal>
599             <para>Get integer value from an scalar integer variable. Precision is specified in function name.</para>
600             <para>
601                 precision of output must match with precision of <varname>var</varname>.
602             </para>
603         </refsection>
604         <refsection id="api_integer_scilab_getIntegerArray">
605             <literal>
606                 <link linkend="api_types_scilabStatus">
607                     <command>scilabStatus</command>
608                 </link>
609                 <varname>scilab_getIntegerArray</varname>(
610                 <link linkend="api_types_scilabEnv">
611                     <command>scilabEnv</command>
612                 </link>
613                 env,
614                 <link linkend="api_types_scilabVar">
615                     <command>scilabVar</command>
616                 </link>
617                 var, void** vals)
618             </literal>
619             <para/>
620             <literal>
621                 <link linkend="api_types_scilabStatus">
622                     <command>scilabStatus</command>
623                 </link>
624                 <varname>scilab_getInteger8Array</varname>(
625                 <link linkend="api_types_scilabEnv">
626                     <command>scilabEnv</command>
627                 </link>
628                 env,
629                 <link linkend="api_types_scilabVar">
630                     <command>scilabVar</command>
631                 </link>
632                 var, char** vals)
633             </literal>
634             <para/>
635             <literal>
636                 <link linkend="api_types_scilabStatus">
637                     <command>scilabStatus</command>
638                 </link>
639                 <varname>scilab_getInteger16Array</varname>(
640                 <link linkend="api_types_scilabEnv">
641                     <command>scilabEnv</command>
642                 </link>
643                 env,
644                 <link linkend="api_types_scilabVar">
645                     <command>scilabVar</command>
646                 </link>
647                 var, short** vals)
648             </literal>
649             <para/>
650             <literal>
651                 <link linkend="api_types_scilabStatus">
652                     <command>scilabStatus</command>
653                 </link>
654                 <varname>scilab_getInteger32Array</varname>(
655                 <link linkend="api_types_scilabEnv">
656                     <command>scilabEnv</command>
657                 </link>
658                 env,
659                 <link linkend="api_types_scilabVar">
660                     <command>scilabVar</command>
661                 </link>
662                 var, int** vals)
663             </literal>
664             <para/>
665             <literal>
666                 <link linkend="api_types_scilabStatus">
667                     <command>scilabStatus</command>
668                 </link>
669                 <varname>scilab_getInteger64Array</varname>(
670                 <link linkend="api_types_scilabEnv">
671                     <command>scilabEnv</command>
672                 </link>
673                 env,
674                 <link linkend="api_types_scilabVar">
675                     <command>scilabVar</command>
676                 </link>
677                 var, long long** vals)
678             </literal>
679             <para/>
680             <literal>
681                 <link linkend="api_types_scilabStatus">
682                     <command>scilabStatus</command>
683                 </link>
684                 <varname>scilab_getUnsignedInteger8Array</varname>(
685                 <link linkend="api_types_scilabEnv">
686                     <command>scilabEnv</command>
687                 </link>
688                 env,
689                 <link linkend="api_types_scilabVar">
690                     <command>scilabVar</command>
691                 </link>
692                 var, unsigned char** vals)
693             </literal>
694             <para/>
695             <literal>
696                 <link linkend="api_types_scilabStatus">
697                     <command>scilabStatus</command>
698                 </link>
699                 <varname>scilab_getUnsignedInteger16Array</varname>(
700                 <link linkend="api_types_scilabEnv">
701                     <command>scilabEnv</command>
702                 </link>
703                 env,
704                 <link linkend="api_types_scilabVar">
705                     <command>scilabVar</command>
706                 </link>
707                 var, unsigned short** vals)
708             </literal>
709             <para/>
710             <literal>
711                 <link linkend="api_types_scilabStatus">
712                     <command>scilabStatus</command>
713                 </link>
714                 <varname>scilab_getUnsignedInteger32Array</varname>(
715                 <link linkend="api_types_scilabEnv">
716                     <command>scilabEnv</command>
717                 </link>
718                 env,
719                 <link linkend="api_types_scilabVar">
720                     <command>scilabVar</command>
721                 </link>
722                 var, unsigned int** vals)
723             </literal>
724             <para/>
725             <literal>
726                 <link linkend="api_types_scilabStatus">
727                     <command>scilabStatus</command>
728                 </link>
729                 <varname>scilab_getUnsignedInteger64Array</varname>(
730                 <link linkend="api_types_scilabEnv">
731                     <command>scilabEnv</command>
732                 </link>
733                 env,
734                 <link linkend="api_types_scilabVar">
735                     <command>scilabVar</command>
736                 </link>
737                 var, unsigned long long** vals)
738             </literal>
739             <para>
740                 Get pointer on internal array of integer of <varname>var</varname>.
741             </para>
742         </refsection>
743         <refsection id="api_integer_scilab_setIntegerArray">
744             <literal>
745                 <link linkend="api_types_scilabStatus">
746                     <command>scilabStatus</command>
747                 </link>
748                 <varname>scilab_setIntegerArray</varname>(
749                 <link linkend="api_types_scilabEnv">
750                     <command>scilabEnv</command>
751                 </link>
752                 env,
753                 <link linkend="api_types_scilabVar">
754                     <command>scilabVar</command>
755                 </link>
756                 var, const void* vals);
757             </literal>
758             <para/>
759             <literal>
760                 <link linkend="api_types_scilabStatus">
761                     <command>scilabStatus</command>
762                 </link>
763                 <varname>scilab_setInteger8Array</varname>(
764                 <link linkend="api_types_scilabEnv">
765                     <command>scilabEnv</command>
766                 </link>
767                 env,
768                 <link linkend="api_types_scilabVar">
769                     <command>scilabVar</command>
770                 </link>
771                 var, const char* vals);
772             </literal>
773             <para/>
774             <literal>
775                 <link linkend="api_types_scilabStatus">
776                     <command>scilabStatus</command>
777                 </link>
778                 <varname>scilab_setInteger16Array</varname>(
779                 <link linkend="api_types_scilabEnv">
780                     <command>scilabEnv</command>
781                 </link>
782                 env,
783                 <link linkend="api_types_scilabVar">
784                     <command>scilabVar</command>
785                 </link>
786                 var, const short* vals);
787             </literal>
788             <para/>
789             <literal>
790                 <link linkend="api_types_scilabStatus">
791                     <command>scilabStatus</command>
792                 </link>
793                 <varname>scilab_setInteger32Array</varname>(
794                 <link linkend="api_types_scilabEnv">
795                     <command>scilabEnv</command>
796                 </link>
797                 env,
798                 <link linkend="api_types_scilabVar">
799                     <command>scilabVar</command>
800                 </link>
801                 var, const int* vals);
802             </literal>
803             <para/>
804             <literal>
805                 <link linkend="api_types_scilabStatus">
806                     <command>scilabStatus</command>
807                 </link>
808                 <varname>scilab_setInteger64Array</varname>(
809                 <link linkend="api_types_scilabEnv">
810                     <command>scilabEnv</command>
811                 </link>
812                 env,
813                 <link linkend="api_types_scilabVar">
814                     <command>scilabVar</command>
815                 </link>
816                 var, const long long* vals);
817             </literal>
818             <para/>
819             <literal>
820                 <link linkend="api_types_scilabStatus">
821                     <command>scilabStatus</command>
822                 </link>
823                 <varname>scilab_setUnsignedInteger8Array</varname>(
824                 <link linkend="api_types_scilabEnv">
825                     <command>scilabEnv</command>
826                 </link>
827                 env,
828                 <link linkend="api_types_scilabVar">
829                     <command>scilabVar</command>
830                 </link>
831                 var, const unsigned char* vals);
832             </literal>
833             <para/>
834             <literal>
835                 <link linkend="api_types_scilabStatus">
836                     <command>scilabStatus</command>
837                 </link>
838                 <varname>scilab_setUnsignedInteger16Array</varname>(
839                 <link linkend="api_types_scilabEnv">
840                     <command>scilabEnv</command>
841                 </link>
842                 env,
843                 <link linkend="api_types_scilabVar">
844                     <command>scilabVar</command>
845                 </link>
846                 var, const unsigned short* vals);
847             </literal>
848             <para/>
849             <literal>
850                 <link linkend="api_types_scilabStatus">
851                     <command>scilabStatus</command>
852                 </link>
853                 <varname>scilab_setUnsignedInteger32Array</varname>(
854                 <link linkend="api_types_scilabEnv">
855                     <command>scilabEnv</command>
856                 </link>
857                 env,
858                 <link linkend="api_types_scilabVar">
859                     <command>scilabVar</command>
860                 </link>
861                 var, const unsigned int* vals);
862             </literal>
863             <para/>
864             <literal>
865                 <link linkend="api_types_scilabStatus">
866                     <command>scilabStatus</command>
867                 </link>
868                 <varname>scilab_setUnsignedInteger64Array</varname>(
869                 <link linkend="api_types_scilabEnv">
870                     <command>scilabEnv</command>
871                 </link>
872                 env,
873                 <link linkend="api_types_scilabVar">
874                     <command>scilabVar</command>
875                 </link>
876                 var, const unsigned long long* vals);
877             </literal>
878             <para>
879                 Set values of integer variable <varname>var</varname>.
880             </para>
881         </refsection>
882     </refsynopsisdiv>
883     <refsection>
884         <title>Examples</title>
885         <programlisting role="code_gateway">
886             <![CDATA[
887 #include "api_scilab.h"
888 #include "Scierror.h"
889 #include "localization.h"
890 #include "sciprint.h"
891 #include "sci_malloc.h"
892
893 const char fname[] = "int_test";
894
895 int sci_int_test(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt opt, int nout, scilabVar* out)
896 {
897     int i = 0;
898     int inr1 = 0;
899     int inc1 = 0;
900     int size1 = 0;
901     int* in1 = NULL;
902
903     int in2 = 0;
904
905     int* out1 = NULL;
906
907     int* out2dims = NULL;
908     int* out2 = NULL;
909
910     int out3 = 0;
911
912     if (nin != 2)
913     {
914         Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), fname, 2);
915         return SCILAB_ERROR;
916     }
917
918     if (nout != 3)
919     {
920         Scierror(999, _("%s: Wrong number of output arguments: %d expected.\n"), fname, 3);
921         return SCILAB_ERROR;
922     }
923
924     //in[0] : matrix 2d of int32
925     if (scilab_isInt32(env, in[0]) == 0 || scilab_isMatrix(env, in[0]) == 0)
926     {
927         Scierror(999, _("%s: Wrong type for input argument #%d: A int32 matrix expected.\n"), fname, 1);
928         return SCILAB_ERROR;
929     }
930
931     size1 = scilab_getDim2d(env, in[0], &inr1, &inc1);
932     scilab_getInteger32Array(env, in[0], &in1);
933
934     //in[1] : int
935     if (scilab_isInt32(env, in[1]) == 0 || scilab_isScalar(env, in[1]) == 0)
936     {
937         Scierror(999, _("%s: Wrong type for input argument #%d: A int expected.\n"), fname, 2);
938         return SCILAB_ERROR;
939     }
940
941     scilab_getInteger32(env, in[1], &in2);
942
943     //out1 : matrix 2d of int with same size of in[0]
944     out[0] = scilab_createIntegerMatrix2d32(env, inr1, inc1);
945     scilab_getInteger32Array(env, out[0], &out1);
946
947     for (i = 0; i < size1; ++i)
948     {
949         out1[i] = in1[i] * 10;
950     }
951
952     //out2 : 3d matrix of int
953     out2dims = (int*)MALLOC(3 * sizeof(int));
954     out2dims[0] = inr1;
955     out2dims[1] = inc1;
956     out2dims[2] = 2;
957
958     out[1] = scilab_createIntegerMatrix32(env, 3, out2dims, 0);
959     scilab_getInteger32Array(env, out[1], &out2);
960
961     for (i = 0; i < size1; ++i)
962     {
963         out2[i] = in1[i] * 10;
964         out2[i + size1] = in1[i] * 100;
965     }
966
967     //out3 : int
968     out[2] = scilab_createInteger32(env, in2 * 1000);
969     return SCILAB_OK;
970 }
971             ]]>
972         </programlisting>
973     </refsection>
974     <refsection>
975         <title>Scilab test script</title>
976         <programlisting role="code_scilab">
977             <![CDATA[
978 mkdir(pathconvert(TMPDIR+"/api_c/"));
979 cd(pathconvert(TMPDIR+"/api_c/"));
980 copyfile(SCI+"/modules/api_scilab/tests/unit_tests/api_c/int_test.c",pathconvert(TMPDIR+"/api_c/int_test.c",%F));
981
982 ilib_build("libint",["int_test","sci_int_test", "csci6"],"int_test.c",[],"","","");
983 exec("loader.sce");
984
985 in1 = int32(rand(3,4) *1000);
986 in2 = int32(rand() * 1000);
987
988 [out1, out2, out3] = int_test(in1, in2);
989
990 assert_checkequal(out1, in1 * 10);
991 ref(:,:, 1) = in1 * 10;
992 ref(:,:, 2) = in1 * 100;
993 assert_checkequal(out2, ref);
994 assert_checkequal(out3, in2 * 1000);
995 disp("OK");
996             ]]>
997         </programlisting>
998     </refsection>
999 </refentry>