add more help pages related to CAPI - check parameters - optional parameters
[scilab.git] / scilab / modules / core / help / en_US / capi / CheckDimProp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry version="5.0-subset Scilab" xml:id="CheckDimProp" 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>CheckDimProp</refname>
11
12     <refpurpose>C interface function which checks the comatibility between 2
13     arguments send to the C function</refpurpose>
14   </refnamediv>
15
16   <refsynopsisdiv>
17     <title>Calling Sequence</title>
18
19     <synopsis>CheckColumn(StackPos_var1,StackPos_var2,expression)</synopsis>
20   </refsynopsisdiv>
21
22   <refsection>
23     <title>Parameters</title>
24
25     <variablelist>
26       <varlistentry>
27         <term>StackPos_var1</term>
28
29         <listitem>
30           <para>the position on the stack of the first variable for which we
31           want to perform the check (input parameter)</para>
32         </listitem>
33       </varlistentry>
34
35       <varlistentry>
36         <term>StackPos_var2</term>
37
38         <listitem>
39           <para>the position on the stack of the second variable for which we
40           want to perform the check (input parameter)</para>
41         </listitem>
42       </varlistentry>
43
44       <varlistentry>
45         <term>expression</term>
46
47         <listitem>
48           <para>a boolean expression which represent the size check we want to
49           perform</para>
50         </listitem>
51       </varlistentry>
52     </variablelist>
53   </refsection>
54
55   <refsection>
56     <title>Description</title>
57
58     <para>C interface function which checks the comatibility between 2
59     arguments send to the C function. 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   int m2, n2, l2;
74
75   CheckRhs(2,2);
76
77   GetRhsVar(1, "d", &amp;m1, &amp;n1, &amp;l1);
78   GetRhsVar(2, "d", &amp;m2, &amp;n2, &amp;l2);
79
80   // Check compatibility beetween arg 1 and arg 2. We want m1*n1 == n2 
81   CheckDimProp(1,2, m1 * n1 != n2); 
82
83   return 0;
84 }
85  </programlisting>
86   </refsection>
87
88   <refsection>
89     <title>See Also</title>
90
91     <simplelist type="inline">
92       <member><link linkend="CheckColumn">CheckColumn</link></member>
93       <member><link linkend="CheckDims">CheckDims</link></member>
94       <member><link linkend="CheckRow">CheckRow</link></member>
95       <member><link linkend="CheckScalar">CheckScalar</link></member>
96       <member><link linkend="CheckVector">CheckVector</link></member>
97       <member><link linkend="OverLoad">CheckOverLoad</link></member>
98       <member><link linkend="CheckLength">CheckLength</link></member>
99       <member><link linkend="CheckSameDims">CheckSameDims</link></member>
100       <member><link linkend="CheckSquare">CheckSquare</link></member>
101       <member><link linkend="How to check parameters">HowToCheckParameters</link></member>
102     </simplelist>
103   </refsection>
104 </refentry>