Bug : 11779 add type for getNbInputargument and getNbOutputArgument
[scilab.git] / scilab / modules / api_scilab / help / en_US / low_level_functions / getNbInputArgument.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="getNbInputArgument" xml:lang="en">
3     <refnamediv>
4         <refname>getNbInputArgument (Scilab gateway)</refname>
5         <refpurpose>A C gateway function which provides the number of input
6             arguments present in the calling Scilab function
7         </refpurpose>
8     </refnamediv>
9     <refsynopsisdiv>
10         <title>Calling Sequence</title>
11         <synopsis>int* nb_params = getNbInputArgument(void* _pvCtx)</synopsis>
12         <synopsis>int nb_params = nbInputArgument(void* _pvCtx)</synopsis>
13         <synopsis>int nb_params = Rhs</synopsis>
14     </refsynopsisdiv>
15     <refsection>
16         <title>Arguments</title>
17         <variablelist>
18             <varlistentry>
19                 <term>_pvCtx</term>
20                 <listitem>
21                     <para>
22                         Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h
23                     </para>
24                 </listitem>
25             </varlistentry>
26             <varlistentry>
27                 <term>nb_params</term>
28                 <listitem>
29                     <para>the pointer on the number of input arguments present in the calling Scilab
30                         function
31                     </para>
32                 </listitem>
33             </varlistentry>
34         </variablelist>
35     </refsection>
36     <refsection>
37         <title>Description</title>
38         <para>A C gateway function which provides the number of input arguments
39             present in the calling Scilab function. You must include api_scilab.h to
40             benefit from this function.
41         </para>
42     </refsection>
43     <refsection>
44         <title>Examples</title>
45         <para>In this example, the C interface function can take several input
46             arguments and prints in the Scilab console the integer corresponding to
47             the number of input arguments detected in the calling Scilab
48             function.
49         </para>
50         <programlisting role="example">
51             <![CDATA[ 
52 #include "api_scilab.h"
53 #include "sciprint.h"
54
55 int sci_myrhs(char * fname)
56 {
57   sciprint("The number of input parameters is %d\n", *getNbInputArgument());
58
59   return 0;
60 }
61  ]]>
62         </programlisting>
63     </refsection>
64     <refsection role="see also">
65         <title>See Also</title>
66         <simplelist type="inline">
67             <member>
68                 <link linkend="getNbOutputArgument">getNbOutputArgument</link>
69             </member>
70             <member>
71                 <link linkend="sciprint">sciprint</link>
72             </member>
73         </simplelist>
74     </refsection>
75 </refentry>