Bug : 11789 add document for nbInputArgument 54/14054/2
Sylvain GENIN [Tue, 18 Mar 2014 10:10:18 +0000 (11:10 +0100)]
Change-Id: I2f568139113b65eaa89ff49d5d88a65b67244639

scilab/CHANGES_5.5.X
scilab/modules/api_scilab/help/en_US/low_level_functions/nbInputArgument.xml [new file with mode: 0644]

index 217eb28..497d8bd 100644 (file)
@@ -443,6 +443,8 @@ Scilab Bug Fixes
 
 * Bug #11779 fixed - Wrong type in the documentation of getNbInputArgument and getNbOutputArgument fixed.
 
+* Bug #11789 fixed - Documentation was missing for nbInputArgument.
+
 * Bug #11814 fixed - Typo in CACSD help chapter fixed.
 
 * Bug #11953 fixed - Scilab crashed when global("") was typed.
diff --git a/scilab/modules/api_scilab/help/en_US/low_level_functions/nbInputArgument.xml b/scilab/modules/api_scilab/help/en_US/low_level_functions/nbInputArgument.xml
new file mode 100644 (file)
index 0000000..68f77dd
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="nbInputArgument" xml:lang="en">
+    <refnamediv>
+        <refname>nbInputArgument (Scilab gateway)</refname>
+        <refpurpose>A C gateway function which provides the number of input
+            arguments present in the calling Scilab function
+        </refpurpose>
+    </refnamediv>
+    <refsynopsisdiv>
+        <title>Calling Sequence</title>
+        <synopsis>int nb_params = nbInputArgument(void* _pvCtx)</synopsis>
+        <synopsis>int nb_params = Rhs</synopsis>
+    </refsynopsisdiv>
+    <refsection>
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>_pvCtx</term>
+                <listitem>
+                    <para>
+                        Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>nb_params</term>
+                <listitem>
+                    <para>the number of input arguments present in the calling Scilab
+                        function
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
+        <title>Description</title>
+        <para>A C gateway function which provides the number of input arguments
+            present in the calling Scilab function. You must include api_scilab.h to
+            benefit from this function.
+        </para>
+    </refsection>
+    <refsection>
+        <title>Examples</title>
+        <para>In this example, the C interface function can take several input
+            arguments and prints in the Scilab console the integer corresponding to
+            the number of input arguments detected in the calling Scilab
+            function.
+        </para>
+        <programlisting role="example">
+            <![CDATA[ 
+#include "api_scilab.h"
+#include "sciprint.h"
+
+int sci_myrhs(char * fname)
+{
+  sciprint("The number of input parameters is %d\n", nbInputArgument);
+
+  return 0;
+}
+ ]]>
+        </programlisting>
+    </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="getNbInputArgument">getNbInputArgument</link>
+            </member>
+            <member>
+                <link linkend="sciprint">sciprint</link>
+            </member>
+        </simplelist>
+    </refsection>
+</refentry>