add more help pages related to CAPI - check parameters - optional parameters
[scilab.git] / scilab / modules / core / help / en_US / capi / CheckDims.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry version="5.0-subset Scilab" xml:id="CheckColumn" 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>CheckDims</refname>
11
12     <refpurpose>C interface function which checks if a parameter send to the C
13     function has the required dimensions</refpurpose>
14   </refnamediv>
15
16   <refsynopsisdiv>
17     <title>Calling Sequence</title>
18
19     <synopsis>CheckDims(StackPos,m_var,n_var,m_required,n_required)</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 (input parameter)</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 (input parameter)</para>
50         </listitem>
51       </varlistentry>
52
53       <varlistentry>
54         <term>m_required</term>
55
56         <listitem>
57           <para>the required number of lines (input parameter)</para>
58         </listitem>
59       </varlistentry>
60
61       <varlistentry>
62         <term>n_required</term>
63
64         <listitem>
65           <para>the required number of columns (input parameter)</para>
66         </listitem>
67       </varlistentry>
68     </variablelist>
69   </refsection>
70
71   <refsection>
72     <title>Description</title>
73
74     <para>C interface function which checks if a parameter send to the C
75     function has the required dimensions. You must include stack-c.h to
76     benefit from this function. If the test fails, we return from the C
77     interface and an adequate error message is printed in the Scilab
78     console.</para>
79   </refsection>
80
81   <refsection>
82     <title>Examples</title>
83
84     <programlisting role="example"> 
85 #include &lt;stack-c.h&gt;
86
87 int sci_check_properties(char * fname)
88 {
89   int m1, n1, l1;
90
91   CheckRhs(1,1);
92
93   GetRhsVar(1, "d", &amp;m1, &amp;n1, &amp;l1);
94
95   CheckDims(1,m1,n1,1,4); // Check that argument is a 1x4 matrix
96
97   return 0;
98 }
99  </programlisting>
100   </refsection>
101
102   <refsection>
103     <title>See Also</title>
104
105     <simplelist type="inline">
106       <member><link linkend="CheckColumn">CheckColumn</link></member>
107       <member><link linkend="CheckRow">CheckRow</link></member>
108       <member><link linkend="CheckScalar">CheckScalar</link></member>
109       <member><link linkend="CheckVector">CheckVector</link></member>
110       <member><link linkend="OverLoad">CheckOverLoad</link></member>
111       <member><link linkend="CheckDimProp">CheckDimProp</link></member>
112       <member><link linkend="CheckLength">CheckLength</link></member>
113       <member><link linkend="CheckSameDims">CheckSameDims</link></member>
114       <member><link linkend="CheckSquare">CheckSquare</link></member>
115       <member><link linkend="How to check parameters">HowToCheckParameters</link></member>
116     </simplelist>
117   </refsection>
118 </refentry>