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