1 <?xml version="1.0" encoding="windows-1251"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2008 - INRIA
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises
9 * This file is hereby licensed under the terms of the GNU GPL v2.0,
10 * pursuant to article 5.3.4 of the CeCILL v.2.1.
11 * This file was originally licensed under the terms of the CeCILL v2.1,
12 * and continues to be available under such terms.
13 * For more information, see the COPYING file which you should have received
14 * along with this program.
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="msprintf" xml:lang="en">
19 <refname>msprintf</refname>
20 <refpurpose>converts, formats, and writes data in a string</refpurpose>
22 <refnamediv xml:id="sprintf">
23 <refname>sprintf</refname>
24 <refpurpose>converts, formats, and writes data in a string (obsolete)</refpurpose>
28 <synopsis>str = msprintf(format,a1,...,an);</synopsis>
31 <title>Arguments</title>
36 <para>a Scilab string describing the format to use to write the
44 <para>a character string.</para>
48 <term>a1,...,an</term>
50 <para>Specifies the data to be converted and printed according to
58 <title>Description</title>
60 The <literal>msprintf</literal> writes formatted operands in its
61 returned value (a Scilab string). The argument operands are formatted
62 under control of the format operand.
66 Note that, in this case, the escape sequences (<literal>"\n"</literal>) (in format)
67 split string to a matrix of string (see example).
72 <title>Examples</title>
73 <programlisting role="example"><![CDATA[
74 msprintf('%5.3f %5.3f',123,0.732)
75 msprintf('%5.3f\n%5.3f',123,0.732)
76 msprintf('--%s-\n-%d--',"hello",3)
77 msprintf('%e ', [1;2;3])
78 msprintf('%d %d\n', [1, 2; 3, 4])
81 <refsection role="see also">
82 <title>See also</title>
83 <simplelist type="inline">
85 <link linkend="mprintf">mprintf</link>
88 <link linkend="printf_conversion">printf_conversion</link>