94 lines
4.0 KiB
HTML
94 lines
4.0 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|||
|
<html lang="ja">
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
|
|||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|||
|
<link rel="up" title="FatFs" href="../00index_j.html">
|
|||
|
<link rel="alternate" hreflang="en" title="English" href="../en/printf.html">
|
|||
|
<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
|
|||
|
<title>FatFs - f_printf</title>
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
|
|||
|
<div class="para func">
|
|||
|
<h2>f_printf</h2>
|
|||
|
<p><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>ɏ<EFBFBD><C98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݂܂<DD82><DC82>B</p>
|
|||
|
<pre>
|
|||
|
int f_printf (
|
|||
|
FIL* <span class="arg">fp</span>, <span class="c">/* [IN] <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g */</span>
|
|||
|
const TCHAR* <span class="arg">fmt</span>, <span class="c">/* [IN] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䕶<EFBFBD><E495B6><EFBFBD><EFBFBD> */</span>
|
|||
|
...
|
|||
|
);
|
|||
|
</pre>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="para arg">
|
|||
|
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
|
|||
|
<dl class="par">
|
|||
|
<dt>fp</dt>
|
|||
|
<dd><EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>E<EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>\<5C><><EFBFBD>̂ւ̃|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD>肵<EFBFBD>܂<EFBFBD><DC82>B</dd>
|
|||
|
<dt>fmt</dt>
|
|||
|
<dd><EFBFBD>k<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>'\0'</tt><EFBFBD>I<EFBFBD>[<5B>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䕶<EFBFBD><E495B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>w<EFBFBD><77><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>^<5E><><EFBFBD>w<EFBFBD>肵<EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>k<EFBFBD><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͏<EFBFBD><CD8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B</dd>
|
|||
|
<dt>...</dt>
|
|||
|
<dd><EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̈<EFBFBD><EFBFBD><EFBFBD><EFBFBD>B</dd>
|
|||
|
|
|||
|
</dl>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="para ret">
|
|||
|
<h4><EFBFBD>߂<EFBFBD><EFBFBD>l</h4>
|
|||
|
<p><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɏ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƁA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂ꂽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B<EFBFBD>f<EFBFBD>B<EFBFBD>X<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>܂<EFBFBD><EFBFBD>͂<EFBFBD><EFBFBD>̑<EFBFBD><EFBFBD>G<EFBFBD><EFBFBD><EFBFBD>[<5B>ɂ<EFBFBD><C982>萳<EFBFBD><E890B3><EFBFBD>ɏ<EFBFBD><C98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>́A<CD81><EFBFBD><D690>͎<EFBFBD><CD8E>s<EFBFBD><73><tt>EOF (-1)</tt><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B</p>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="para desc">
|
|||
|
<h4><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
|
|||
|
<p><EFBFBD><EFBFBD><EFBFBD>̊<EFBFBD><EFBFBD>́A<a href="putc.html"><tt>f_putc()</tt></a><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><a href="puts.html"><tt>f_puts()</tt></a><EFBFBD>̃<EFBFBD><EFBFBD>b<EFBFBD>p<EFBFBD>[<5B><EFBFBD><D690>ł<EFBFBD><C582>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>\<5C><>C<EFBFBD>W<EFBFBD><57><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>̃T<CC83>u<EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD>ƂȂ<C682><C882>Ă<EFBFBD><C482>āA<C481><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䕶<EFBFBD><E495B6><EFBFBD>͎<EFBFBD><CD8E>Ɏ<EFBFBD><C98E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂<EFBFBD><CC82>g<EFBFBD>p<EFBFBD>\<5C>ł<EFBFBD><C582>B</p>
|
|||
|
<ul>
|
|||
|
<li><EFBFBD>^<5E>C<EFBFBD>v: <tt>c C s S d D u U x X b B</tt></li>
|
|||
|
<li><EFBFBD><EFBFBD><EFBFBD>x<EFBFBD>w<EFBFBD><EFBFBD>: <tt>l L</tt></li>
|
|||
|
<li><EFBFBD>t<EFBFBD><EFBFBD><EFBFBD>O: <tt>0 -</tt></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="para comp">
|
|||
|
<h4><EFBFBD>Ή<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h4>
|
|||
|
<p><tt>_FS_READONLY == 0</tt><EFBFBD>ŁA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><tt>_USE_STRFUNC</tt><EFBFBD><EFBFBD> 1<>܂<EFBFBD><DC82><EFBFBD> 2<>̂Ƃ<CC82><C682>g<EFBFBD>p<EFBFBD>\<5C>ɂȂ<C982><C882>܂<EFBFBD><DC82>B2<42>̎<EFBFBD><CC8E>́A<CD81>o<EFBFBD>͂Ɋ܂܂<DC82><DC82><EFBFBD><tt>'\n'</tt><EFBFBD><EFBFBD><tt>'\r'+'\n'</tt><EFBFBD>ɓW<EFBFBD>J<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ăt<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>ɏ<EFBFBD><C98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>܂<EFBFBD><DC82>B</p>
|
|||
|
<p>API<EFBFBD><EFBFBD>Unicode<EFBFBD><EFBFBD><EFBFBD>I<EFBFBD><EFBFBD>(<tt>_LFN_UNICODE</tt><EFBFBD><EFBFBD>1)<29><><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>́A<span class="arg">fmt</span><EFBFBD><EFBFBD>Unicode<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂȂ<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>̃G<CC83><47><EFBFBD>R<EFBFBD>[<5B>h<EFBFBD>́A<tt>_STRF_ENCODE</tt><EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>őI<EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȊO<EFBFBD>̎<EFBFBD><EFBFBD>͖<EFBFBD><EFBFBD>ϊ<EFBFBD>(1<>o<EFBFBD>C<EFBFBD>g/1<><31><EFBFBD><EFBFBD>)<29>ŏ<EFBFBD><C58F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݂܂<DD82><DC82>B</p>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="para use">
|
|||
|
<h4><EFBFBD>g<EFBFBD>p<EFBFBD><EFBFBD></h4>
|
|||
|
<pre>
|
|||
|
f_printf(&fil, "%d", 1234); <span class="c">/* "1234" */</span>
|
|||
|
f_printf(&fil, "%6d,%3d%%", -200, 5); <span class="c">/* " -200, 5%" */</span>
|
|||
|
f_printf(&fil, "%ld", 12345L); <span class="c">/* "12345" */</span>
|
|||
|
f_printf(&fil, "%06d", 25); <span class="c">/* "000025" */</span>
|
|||
|
f_printf(&fil, "%06d", -25); <span class="c">/* "000-25" */</span>
|
|||
|
f_printf(&fil, "%-6d", 25); <span class="c">/* "25 " */</span>
|
|||
|
f_printf(&fil, "%u", -1); <span class="c">/* "65535" or "4294967295" */</span>
|
|||
|
f_printf(&fil, "%04x", 0xAB3); <span class="c">/* "0ab3" */</span>
|
|||
|
f_printf(&fil, "%08LX", 0x123ABCL); <span class="c">/* "00123ABC" */</span>
|
|||
|
f_printf(&fil, "%016b", 0x550F); <span class="c">/* "0101010100001111" */</span>
|
|||
|
f_printf(&fil, "%s", "String"); <span class="c">/* "String" */</span>
|
|||
|
f_printf(&fil, "%8s", "abc"); <span class="c">/* " abc" */</span>
|
|||
|
f_printf(&fil, "%-8s", "abc"); <span class="c">/* "abc " */</span>
|
|||
|
f_printf(&fil, "%c", 'a'); <span class="c">/* "a" */</span>
|
|||
|
f_printf(&fil, "%f", 10.0); <span class="c">/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD>͖<EFBFBD><CD96>T<EFBFBD>|<7C>[<5B>g */</span>
|
|||
|
</pre>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="para ref">
|
|||
|
<h4><EFBFBD>Q<EFBFBD><EFBFBD></h4>
|
|||
|
<p><tt><a href="open.html">f_open</a>, <a href="putc.html">f_putc</a>, <a href="puts.html">f_puts</a>, <a href="gets.html">f_gets</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
|
|||
|
</div>
|
|||
|
|
|||
|
<p class="foot"><a href="../00index_j.html"><EFBFBD>߂<EFBFBD></a></p>
|
|||
|
</body>
|
|||
|
</html>
|