File: 256.htm

package info (click to toggle)
eagle 4.16-5
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 36,508 kB
  • sloc: sh: 82; makefile: 32
file content (60 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<title>EAGLE Help: sprintf()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>sprintf()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Writes formatted output into a string.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>int sprintf(string result, string format[, argument, ...]);</tt>
<p>
<dt>
<b>Returns</b>
<dd>
The <tt>sprintf</tt> function returns the number of characters written
into the <tt>result</tt> string.
<p>
In case of an error, <tt>sprintf</tt> returns <tt>-1</tt>.
<p>
</dl>
<b>See also</b> <a href=255.htm>printf</a>
<p>
<b>Format string</b>
<p>
See <a href=255.htm>printf</a>.
<p>
<b>Binary zero characters</b>
<p>
Note that <tt>sprintf</tt> can not return strings with embedded binary zero
characters (0x00). If the resulting string contains a binary zero character,
any characters following that zero character will be dropped.
Use <a href=255.htm>printf</a> if you need to output binary data.
<p>
<b>Example</b>
<pre>
string result;
int number = 42;
sprintf(result, "The number is %d", number);
</pre>

<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright &copy; 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>