Bug 4683 fixed
Vincent COUVERT [Tue, 21 Jul 2009 15:52:45 +0000 (17:52 +0200)]
scilab/modules/data_structures/help/en_US/tlist.xml
scilab/modules/data_structures/help/fr_FR/tlist.xml

index 76bb5c7..c0f9c3c 100644 (file)
     H(2), H('num') or H.num is the transfer matrix numerator</para>
   </refsection>
   <refsection>
+    <title>Examples</title>
+    <programlisting role="example"><![CDATA[
+// tlist creation
+t = tlist(["listtype","field1","field2"], [], []);
+t.field1(1) = 10;
+t.field1(2) = 20;
+t.field2(1) = "Scilab";
+t.field2(2) = "tlist";
+t.field2(3) = "example";
+
+// Fields contents display
+disp(t.field1)
+disp(t.field2)
+
+// Generic tlist display
+disp(t)
+
+// Overloading display for this type of tlist
+function %listtype_p(mytlist)
+
+f = fieldnames(mytlist);
+
+// typeof(mytlist) <=> f(1)
+mprintf("Displaying a tlist of type: %s\n", typeof(mytlist));
+
+mprintf("\n");
+
+mprintf("-- Field ''%s'' --\n", f(1));
+mprintf("Contents: %s\n", sci2exp(mytlist(f(1))));
+
+mprintf("\n");
+
+mprintf("-- Field ''%s'' --\n", f(2));
+mprintf("Contents: %s\n", sci2exp(mytlist(f(2))));
+
+endfunction
+
+// Display using overloading function
+disp(t)
+]]></programlisting>
+  </refsection>
+  <refsection>
     <title>See Also</title>
     <simplelist type="inline">
       <member>
index 47687b2..7806c6f 100644 (file)
   </para>
   </refsection>
   <refsection>
+    <title>Exemples</title>
+    <programlisting role="example"><![CDATA[
+// tlist creation
+t = tlist(["listtype","field1","field2"], [], []);
+t.field1(1) = 10;
+t.field1(2) = 20;
+t.field2(1) = "Scilab";
+t.field2(2) = "tlist";
+t.field2(3) = "example";
+
+// Fields contents display
+disp(t.field1)
+disp(t.field2)
+
+// Generic tlist display
+disp(t)
+
+// Overloading display for this type of tlist
+function %listtype_p(mytlist)
+
+f = fieldnames(mytlist);
+
+// typeof(mytlist) <=> f(1)
+mprintf("Displaying a tlist of type: %s\n", typeof(mytlist));
+
+mprintf("\n");
+
+mprintf("-- Field ''%s'' --\n", f(1));
+mprintf("Contents: %s\n", sci2exp(mytlist(f(1))));
+
+mprintf("\n");
+
+mprintf("-- Field ''%s'' --\n", f(2));
+mprintf("Contents: %s\n", sci2exp(mytlist(f(2))));
+
+endfunction
+
+// Display using overloading function
+disp(t)
+]]></programlisting>
+  </refsection>
+  <refsection>
     <title>Voir Aussi</title>
     <simplelist type="inline">
       <member>