~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/string/help/en_US/string.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 *
13
13
 -->
14
14
<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" version="5.0-subset Scilab" xml:id="string" xml:lang="en">
15
 
  <refnamediv>
16
 
    <refname>string</refname>
17
 
    <refpurpose>conversion to string</refpurpose>
18
 
  </refnamediv>
19
 
  <refsynopsisdiv>
20
 
    <title>Calling Sequence</title>
21
 
    <synopsis>string(x)
22
 
      [out, in, text] = string(x)
23
 
    </synopsis>
24
 
  </refsynopsisdiv>
25
 
  <refsection>
26
 
    <title>Arguments</title>
27
 
    <variablelist>
28
 
      <varlistentry>
29
 
        <term>x</term>
30
 
        <listitem>
31
 
          <para>Boolean, complex, real, integer, polynomial matrix, implicit
32
 
            size, library or function
33
 
          </para>
34
 
        </listitem>
35
 
      </varlistentry>
36
 
    </variablelist>
37
 
  </refsection>
38
 
  <refsection>
39
 
    <title>Description</title>
40
 
    <para>converts a matrix into a matrix of strings.</para>
41
 
    <para>
42
 
      If <literal>x</literal> is a function <literal>[out, in, text] =
43
 
        string(x)
44
 
      </literal>
45
 
      returns three vectors strings : <literal>out</literal>
46
 
      is the vector of output variables, <literal>in</literal> is the vector of
47
 
      input variables, and <literal>text</literal> is the (column) vector of the
48
 
      source code of the function.
49
 
    </para>
50
 
    <para>
51
 
      If <literal>x</literal> is a <literal>lib</literal> variable
52
 
      (library), text is a character string column vector. The first element
53
 
      contains the path of library file and the other the name of functions it
54
 
      defines.
55
 
    </para>
56
 
    <para>
57
 
      Character strings are defined as <literal>'string'</literal>
58
 
      (between quotes) or <literal>"string"</literal> (between doublequotes);
59
 
      matrices of strings are defined as usual constant matrices.
60
 
    </para>
61
 
    <para>
62
 
      Concatenation of strings is made by the <literal>+</literal>
63
 
      operation.
64
 
    </para>
65
 
    <para>For complex, real, integer, polynomial matrix
66
 
      <literal>string</literal> output is managed by <link linkend="format">format</link> function (see examples).
67
 
    </para>
68
 
  </refsection>
69
 
  <refsection>
70
 
    <title>Examples</title>
71
 
    <programlisting role="example">string(rand(2, 2))
72
 
      
73
 
      deff("y = mymacro(x)", "y = x + 1")
74
 
      [out, in, text] = string(mymacro)
75
 
      x = 123.356;
76
 
      disp("Result is " + string(x));
77
 
      
78
 
      disp("/" + string(~%t) + "/");
79
 
      disp("/" + string(%i+1) + "/");
80
 
      disp("/" + string(int16(-123)) + "/");
81
 
      disp("/" + string(1 + %s + %s^3) + "/");
82
 
      
83
 
      string(corelib)
84
 
      
85
 
      v = format();
86
 
      disp(string(%pi))
87
 
      format(24);
88
 
      disp(string(%pi))
89
 
      format(v(2))
90
 
      
91
 
      string(1:4:$)
92
 
    </programlisting>
93
 
  </refsection>
94
 
  <refsection role="see also">
95
 
    <title>See Also</title>
96
 
    <simplelist type="inline">
97
 
      <member>
98
 
        <link linkend="part">part</link>
99
 
      </member>
100
 
      <member>
101
 
        <link linkend="length">length</link>
102
 
      </member>
103
 
      <member>
104
 
        <link linkend="quote">quote</link>
105
 
      </member>
106
 
      <member>
107
 
        <link linkend="evstr">evstr</link>
108
 
      </member>
109
 
      <member>
110
 
        <link linkend="execstr">execstr</link>
111
 
      </member>
112
 
      <member>
113
 
        <link linkend="strsubst">strsubst</link>
114
 
      </member>
115
 
      <member>
116
 
        <link linkend="strcat">strcat</link>
117
 
      </member>
118
 
      <member>
119
 
        <link linkend="strindex">strindex</link>
120
 
      </member>
121
 
      <member>
122
 
        <link linkend="sci2exp">sci2exp</link>
123
 
      </member>
124
 
      <member>
125
 
        <link linkend="format">format</link>
126
 
      </member>
127
 
    </simplelist>
128
 
  </refsection>
129
 
  <refsection>
130
 
    <title>History</title>
131
 
    <revhistory>
132
 
      <revision>
133
 
        <revnumber>5.4.0</revnumber>
134
 
        <revremark>implicit size type managed as input argument.</revremark>
135
 
      </revision>
136
 
    </revhistory>
137
 
  </refsection>
 
15
    <refnamediv>
 
16
        <refname>string</refname>
 
17
        <refpurpose>conversion to string</refpurpose>
 
18
    </refnamediv>
 
19
    <refsynopsisdiv>
 
20
        <title>Calling Sequence</title>
 
21
        <synopsis>string(x)
 
22
            [out, in, text] = string(x)
 
23
        </synopsis>
 
24
    </refsynopsisdiv>
 
25
    <refsection>
 
26
        <title>Arguments</title>
 
27
        <variablelist>
 
28
            <varlistentry>
 
29
                <term>x</term>
 
30
                <listitem>
 
31
                    <para>Boolean, complex, real, integer, polynomial matrix, implicit
 
32
                        size, library or function
 
33
                    </para>
 
34
                </listitem>
 
35
            </varlistentry>
 
36
        </variablelist>
 
37
    </refsection>
 
38
    <refsection>
 
39
        <title>Description</title>
 
40
        <para>converts a matrix into a matrix of strings.</para>
 
41
        <para>
 
42
            If <literal>x</literal> is a function <literal>[out, in, text] =
 
43
                string(x)
 
44
            </literal>
 
45
            returns three vectors strings : <literal>out</literal>
 
46
            is the vector of output variables, <literal>in</literal> is the vector of
 
47
            input variables, and <literal>text</literal> is the (column) vector of the
 
48
            source code of the function.
 
49
        </para>
 
50
        <para>
 
51
            If <literal>x</literal> is a <literal>lib</literal> variable
 
52
            (library), text is a character string column vector. The first element
 
53
            contains the path of library file and the other the name of functions it
 
54
            defines.
 
55
        </para>
 
56
        <para>
 
57
            Character strings are defined as <literal>'string'</literal>
 
58
            (between quotes) or <literal>"string"</literal> (between doublequotes);
 
59
            matrices of strings are defined as usual constant matrices.
 
60
        </para>
 
61
        <para>
 
62
            Concatenation of strings is made by the <literal>+</literal>
 
63
            operation.
 
64
        </para>
 
65
        <para>For complex, real, integer, polynomial matrix
 
66
            <literal>string</literal> output is managed by <link linkend="format">format</link> function (see examples).
 
67
        </para>
 
68
    </refsection>
 
69
    <refsection>
 
70
        <title>Examples</title>
 
71
        <programlisting role="example">string(rand(2, 2))
 
72
            
 
73
            deff("y = mymacro(x)", "y = x + 1")
 
74
            [out, in, text] = string(mymacro)
 
75
            x = 123.356;
 
76
            disp("Result is " + string(x));
 
77
            
 
78
            disp("/" + string(~%t) + "/");
 
79
            disp("/" + string(%i+1) + "/");
 
80
            disp("/" + string(int16(-123)) + "/");
 
81
            disp("/" + string(1 + %s + %s^3) + "/");
 
82
            
 
83
            string(corelib)
 
84
            
 
85
            v = format();
 
86
            disp(string(%pi))
 
87
            format(24);
 
88
            disp(string(%pi))
 
89
            format(v(2))
 
90
            
 
91
            string(1:4:$)
 
92
        </programlisting>
 
93
    </refsection>
 
94
    <refsection role="see also">
 
95
        <title>See Also</title>
 
96
        <simplelist type="inline">
 
97
            <member>
 
98
                <link linkend="part">part</link>
 
99
            </member>
 
100
            <member>
 
101
                <link linkend="length">length</link>
 
102
            </member>
 
103
            <member>
 
104
                <link linkend="quote">quote</link>
 
105
            </member>
 
106
            <member>
 
107
                <link linkend="evstr">evstr</link>
 
108
            </member>
 
109
            <member>
 
110
                <link linkend="execstr">execstr</link>
 
111
            </member>
 
112
            <member>
 
113
                <link linkend="strsubst">strsubst</link>
 
114
            </member>
 
115
            <member>
 
116
                <link linkend="strcat">strcat</link>
 
117
            </member>
 
118
            <member>
 
119
                <link linkend="strindex">strindex</link>
 
120
            </member>
 
121
            <member>
 
122
                <link linkend="sci2exp">sci2exp</link>
 
123
            </member>
 
124
            <member>
 
125
                <link linkend="format">format</link>
 
126
            </member>
 
127
        </simplelist>
 
128
    </refsection>
 
129
    <refsection>
 
130
        <title>History</title>
 
131
        <revhistory>
 
132
            <revision>
 
133
                <revnumber>5.4.0</revnumber>
 
134
                <revremark>implicit size type managed as input argument.</revremark>
 
135
            </revision>
 
136
        </revhistory>
 
137
    </refsection>
138
138
</refentry>