add examples for type & typename 28/9728/3
Sylvestre Ledru [Sat, 17 Nov 2012 09:41:22 +0000 (10:41 +0100)]
Change-Id: I425dec9293af32b6ae8516d1d5faaa16fc9e208e

scilab/modules/data_structures/help/en_US/type.xml
scilab/modules/data_structures/help/en_US/typename.xml
scilab/modules/data_structures/help/fr_FR/type.xml
scilab/modules/data_structures/help/fr_FR/typename.xml

index 78002bb..f477aef 100644 (file)
             </note>
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+a=42;
+type(a)
+
+b=%t;
+type(b)
+
+c="foo"
+type(c)
+
+d=sparse([1,2;4,5;3,10],[1,2,3]);
+type(d)
+
+e = tlist(["listtype","field1","field2"], [], []);
+type(e)
+
+f=poly(0,"s");
+type(f)
+
+g=int8([1 -120 127 312]);
+type(g)
+
+h=mlist(['V','name','value'],['a','b';'c' 'd'],[1 2; 3 4]);
+type(h)
+
+l = list(1,["a" "b"]);
+type(l)
+
+]]></programlisting>
+    </refsection>
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 5fb21a9..4c461c0 100644 (file)
         </para>
         <para>Number max. of defined types is 50.</para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+[typs,nams]=typename();
+disp("First type (double) : " + string(typs(1)) + " / " + nams(1));
+typename("mytype",1024);
+[typs,nams]=typename();
+disp(typs($))
+disp(nams($)) // returns mytype
+]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index d26fb64..80bb873 100644 (file)
             de <link linkend="typeof">typeof</link> à la place.
         </para>
     </refsection>
+    <refsection>
+        <title>Exemples</title>
+        <programlisting role="example"><![CDATA[
+a=42;
+type(a)
+
+b=%t;
+type(b)
+
+c="foo"
+type(c)
+
+d=sparse([1,2;4,5;3,10],[1,2,3]);
+type(d)
+
+e = tlist(["listtype","field1","field2"], [], []);
+type(e)
+
+f=poly(0,"s");
+type(f)
+
+g=int8([1 -120 127 312]);
+type(g)
+
+h=mlist(['V','name','value'],['a','b';'c' 'd'],[1 2; 3 4]);
+type(h)
+
+l = list(1,["a" "b"]);
+type(l)
+
+]]></programlisting>
+    </refsection>
     <refsection role="see also">
         <title>Voir aussi</title>
         <simplelist type="inline">
index d2c4ed6..c5010d4 100644 (file)
         </para>
         <para>Nombre max de types defini est 50.</para>
     </refsection>
+    <refsection>
+        <title>Exemples</title>
+        <programlisting role="example"><![CDATA[
+[typs,nams]=typename();
+disp("First type (double) : " + string(typs(1)) + " / " + nams(1));
+typename("mytype",1024);
+[typs,nams]=typename();
+disp(typs($))
+disp(nams($)) // retourne mytype
+]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>Voir aussi</title>
         <simplelist type="inline">