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