add more help pages related to CAPI - check parameters - optional parameters
[scilab.git] / scilab / modules / core / help / en_US / capi / CheckVector.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry version="5.0-subset Scilab" xml:id="CheckVector" 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>CheckVector</refname>
11
12     <refpurpose>C interface function which checks if a parameter send to the C
13     function is a vector (column or row) or not</refpurpose>
14   </refnamediv>
15
16   <refsynopsisdiv>
17     <title>Calling Sequence</title>
18
19     <synopsis>CheckVector(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           perform the check (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 vector (column or row) or not. You must include stack-c.h to
60     benefit from this function. If the test fails, we return from the C
61     interface and an adequate error message is printed in the Scilab
62     console.</para>
63   </refsection>
64
65   <refsection>
66     <title>Examples</title>
67
68     <programlisting role="example"> 
69 #include &lt;stack-c.h&gt;
70
71 int sci_check_properties(char * fname)
72 {
73   int m1, n1, l1;
74
75   CheckRhs(1,1);
76
77   GetRhsVar(1, "d", &amp;m1, &amp;n1, &amp;l1);
78
79   CheckVector(1,m1,n1); // Check that first argument is a vector (column or row)
80
81   return 0;
82 }
83  </programlisting>
84   </refsection>
85
86   <refsection>
87     <title>See Also</title>
88
89     <simplelist type="inline">
90       <member><link linkend="CheckColumn">CheckColumn</link></member>
91       <member><link linkend="CheckDims">CheckDims</link></member>
92       <member><link linkend="CheckRow">CheckRow</link></member>
93       <member><link linkend="CheckScalar">CheckScalar</link></member>
94       <member><link linkend="OverLoad">CheckOverLoad</link></member>
95       <member><link linkend="CheckDimProp">CheckDimProp</link></member>
96       <member><link linkend="CheckLength">CheckLength</link></member>
97       <member><link linkend="CheckSameDims">CheckSameDims</link></member>
98       <member><link linkend="CheckSquare">CheckSquare</link></member>
99       <member><link linkend="How to check parameters">HowToCheckParameters</link></member>
100     </simplelist>
101   </refsection>
102 </refentry>