8ee771f35200ed25bb5d4e0d2aa7c656cb195633
[scilab.git] / scilab / modules / output_stream / help / en_US / msprintf.xml
1 <?xml version="1.0" encoding="windows-1251"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  * ...
6  * 
7  * This file must be used under the terms of the CeCILL.
8  * This source file is licensed as described in the file COPYING, which
9  * you should have received as part of this distribution.  The terms
10  * are also available at    
11  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
12  *
13  -->
14 <refentry version="5.0-subset Scilab" xml:id="msprintf" xml:lang="en"
15           xmlns="http://docbook.org/ns/docbook"
16           xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg"
18           xmlns:ns5="http://www.w3.org/1999/xhtml"
19           xmlns:mml="http://www.w3.org/1998/Math/MathML"
20           xmlns:db="http://docbook.org/ns/docbook">
21   <info>
22     <pubdate>$LastChangedDate$</pubdate>
23   </info>
24
25   <refnamediv>
26     <refname>msprintf</refname>
27
28     <refpurpose>converts, formats, and writes data in a string</refpurpose>
29   </refnamediv>
30
31   <refsynopsisdiv>
32     <title>Calling Sequence</title>
33
34     <synopsis>str=msprintf(format,a1,...,an);</synopsis>
35   </refsynopsisdiv>
36
37   <refsection>
38     <title>Arguments</title>
39
40     <variablelist>
41
42       <varlistentry>
43         <term>format</term>
44
45         <listitem>
46           <para>a Scilab string describing the format to use to write the
47           remaining operands.</para>
48         </listitem>
49       </varlistentry>
50
51       <varlistentry>
52         <term>str</term>
53
54         <listitem>
55           <para>a character string.</para>
56         </listitem>
57       </varlistentry>
58
59       <varlistentry>
60         <term>a1,...,an</term>
61
62         <listitem>
63           <para>Specifies the data to be converted and printed according to
64           the format parameter.</para>
65         </listitem>
66       </varlistentry>
67     </variablelist>
68   </refsection>
69
70   <refsection>
71     <title>Description</title>
72     <para>The <literal>msprintf</literal> writes formatted operands in its
73     returned value (a Scilab string). The argument operands are formatted
74     under control of the format operand.</para>
75     <para>Note that, in this case, the escape sequences (<literal>"\n"</literal>) 
76     split string to a matrix of string (see example)</para>
77   </refsection>
78
79   <refsection>
80     <title>Examples</title>
81
82     <programlisting role="example"><![CDATA[ 
83 msprintf('%5.3f %5.3f',123,0.732)
84 msprintf('%5.3f\n%5.3f',123,0.732)
85 msprintf('--%s-\n-%d--',"hello",3)
86  ]]></programlisting>
87   </refsection>
88
89   <refsection role="see also">
90 <title>See Also</title>
91
92     <simplelist type="inline">
93       <member><link linkend="mprintf">mprintf</link></member>
94       <member><link linkend="printf_conversion">printf_conversion</link></member>
95     </simplelist>
96   </refsection>
97 </refentry>