add more help pages related to CAPI - check parameters - optional parameters
[scilab.git] / scilab / modules / core / help / en_US / capi / CheckRow.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry version="5.0-subset Scilab" xml:id="CheckRow" xml:lang="en"
3           xmlns="http://docbook.org/ns/docbook"
4           xmlns:xlink="http://www.w3.org/1999/xlink"
5           xmlns:svg="http://www.w3.org/2000/svg"
6           xmlns:mml="http://www.w3.org/1998/Math/MathML"
7           xmlns:html="http://www.w3.org/1999/xhtml"
8           xmlns:db="http://docbook.org/ns/docbook">
9   <refnamediv>
10     <refname>CheckRow</refname>
11
12     <refpurpose>C interface function which checks if a parameter send to the C
13     function is a row vector or not</refpurpose>
14   </refnamediv>
15
16   <refsynopsisdiv>
17     <title>Calling Sequence</title>
18
19     <synopsis>CheckRow(StackPos,m_var,n_var)</synopsis>
20   </refsynopsisdiv>
21
22   <refsection>
23     <title>Parameters</title>
24
25     <variablelist>
26       <varlistentry>
27         <term>StackPos</term>
28
29         <listitem>
30           <para>the position on the stack of the variable for which we want to
31           know the type (input parameter)</para>
32         </listitem>
33       </varlistentry>
34
35       <varlistentry>
36         <term>m_var</term>
37
38         <listitem>
39           <para>the number of lines of the parameter at position StackPos on
40           the stack</para>
41         </listitem>
42       </varlistentry>
43
44       <varlistentry>
45         <term>n_var</term>
46
47         <listitem>
48           <para>the number of columns of the parameter at position StackPos on
49           the stack</para>
50         </listitem>
51       </varlistentry>
52     </variablelist>
53   </refsection>
54
55   <refsection>
56     <title>Description</title>
57
58     <para>C interface function which checks if a parameter send to the C
59     function is a row vector or not. You must include stack-c.h to benefit
60     from this function. If the test fails, we return from the C interface and
61     an adequate error message is printed in the Scilab console.</para>
62   </refsection>
63
64   <refsection>
65     <title>Examples</title>
66
67     <programlisting role="example"> 
68 #include &lt;stack-c.h&gt;
69
70 int sci_check_properties(char * fname)
71 {
72   int m1, n1, l1;
73
74   CheckRhs(1,1);
75
76   GetRhsVar(1, "d", &amp;m1, &amp;n1, &amp;l1);
77
78   CheckRow(1,m1,n1); // Check that first argument is a row vector
79
80   return 0;
81 }
82  </programlisting>
83   </refsection>
84
85   <refsection>
86     <title>See Also</title>
87
88     <simplelist type="inline">
89       <member><link linkend="CheckColumn">CheckColumn</link></member>
90       <member><link linkend="CheckDims">CheckDims</link></member>
91       <member><link linkend="CheckScalar">CheckScalar</link></member>
92       <member><link linkend="CheckVector">CheckVector</link></member>
93       <member><link linkend="OverLoad">CheckOverLoad</link></member>
94       <member><link linkend="CheckDimProp">CheckDimProp</link></member>
95       <member><link linkend="CheckLength">CheckLength</link></member>
96       <member><link linkend="CheckSameDims">CheckSameDims</link></member>
97       <member><link linkend="CheckSquare">CheckSquare</link></member>
98       <member><link linkend="How to check parameters">HowToCheckParameters</link></member>
99     </simplelist>
100   </refsection>
101 </refentry>