* Bug 15431 fixed [doc]: empty [] better documented
[scilab.git] / scilab / modules / string / help / en_US / string.xml
index 25077b6..f675cf2 100644 (file)
@@ -3,8 +3,8 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA -
  * Copyright (C) DIGITEO - 2012 - Allan CORNET
- *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ * Copyright (C) 2019 - Samuel GOUGEON
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * pursuant to article 5.3.4 of the CeCILL v.2.1.
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="string" xml:lang="en">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:id="string" xml:lang="en">
     <refnamediv>
         <refname>string</refname>
         <refpurpose>conversion to string</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>string(x)
-            [out, in, text] = string(x)
+        <synopsis>
+            text = string(x)
+            [out, in, text] = string(SciFun)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
                 <listitem>
                     <para>
                         a boolean, complex, real, integer, polynomial matrix,
-                        an implicit size, a library or a function.
+                        an implicitlist (like 1:$), a library of functions in Scilab language.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>SciFun</term>
+                <listitem>
+                    <para>
+                        a function in Scilab language (type 13, not its name as a string).
                     </para>
                 </listitem>
             </varlistentry>
             The <function>string</function> function converts a matrix <varname>x</varname> into a matrix of strings.
         </para>
         <para>
-            If <varname>x</varname> is a function <code>[out, in, text] = string(x)</code>
-            returns three vectors of strings: <varname>out</varname>
-            is the vector of output variables, <varname>in</varname> is the vector of
-            input variables, and <varname>text</varname> is the (column) vector of the
-            source code of the function.
+            If <varname>SciFun</varname> is a function, <literal>[out,in,text] = string(SciFun)</literal>
+            returns three vectors of strings:
+            <itemizedlist>
+                <listitem>
+                    <varname>out</varname> is the row vector of names of its output variables,
+                </listitem>
+                <listitem>
+                    <varname>in</varname> is the row vector of names of its input variables, and
+                </listitem>
+                <listitem>
+                    <varname>text</varname> is the column vector of the source code of the function.
+                </listitem>
+            </itemizedlist>
         </para>
         <para>
             If <varname>x</varname> is a <literal>lib</literal> variable
             (library), <varname>text</varname> is a character string column vector. The first element
-            contains the path of library file and the other the name of functions it
-            defines.
-        </para>
-        <para>
-            Character strings are defined as <literal>'string'</literal>
-            (between quotes) or <literal>"string"</literal> (between doublequotes);
-            matrices of strings are defined as usual constant matrices.
+            contains the path of library file and the other the name of functions it defines.
         </para>
+        <warning>
+            For any complex, real, integer, polynomial or rational input, the format of literal
+            numbers output from <function>string(..)</function> is managed by the
+            <link linkend="format">format</link> function (see examples).
+        </warning>
         <para>
-            Concatenation of strings is made by the <literal>+</literal>
-            operation.
-        </para>
-        <para>
-            For complex, real, integer, polynomial matrix
-            <function>string</function> output is managed by <link linkend="format">format</link> function (see examples).
-        </para>
-        <para>
-            Note that string([]) returns [].
+            Note that string([]) returns [] (unchanged).
         </para>
     </refsection>
     <refsection>
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="part">part</link>
-            </member>
-            <member>
-                <link linkend="length">length</link>
+                <link linkend="format">format</link>
             </member>
             <member>
-                <link linkend="quote">quote</link>
+                <link linkend="sci2exp">sci2exp</link>
             </member>
             <member>
-                <link linkend="evstr">evstr</link>
+                <link linkend="msprintf">msprintf</link>
             </member>
             <member>
-                <link linkend="execstr">execstr</link>
+                <link linkend="tree2code">tree2code</link>
             </member>
             <member>
-                <link linkend="strsubst">strsubst</link>
+                <link linkend="pol2str">pol2str</link>
             </member>
             <member>
-                <link linkend="strcat">strcat</link>
+                <link linkend="execstr">execstr</link>
             </member>
             <member>
-                <link linkend="strindex">strindex</link>
+                <link linkend="evstr">evstr</link>
             </member>
             <member>
-                <link linkend="sci2exp">sci2exp</link>
+                <link linkend="strtod">strtod</link>
             </member>
             <member>
-                <link linkend="format">format</link>
+                <link linkend="csvTextScan">csvTextScan</link>
             </member>
         </simplelist>
     </refsection>
             <revision>
                 <revnumber>5.4.0</revnumber>
                 <revremark>
-                    implicit size type managed as input argument.
+                    Input of implicitlist typeof accepted.
                 </revremark>
             </revision>
         </revhistory>