templeos-info/public/Wb/Home/Doc/Print.DD.HTML

144 lines
13 KiB
Plaintext
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
2024-03-23 13:40:50 +00:00
<pre style="font-family: courier, monospace; font-size: 10pt;">
<a name="l1"></a><span class=cF5> Print Fmt Strs</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a>&lt;fmt_arg&gt; := </span><span class=cF2>%</span><span class=cF0>[</span><span class=cF2>-</span><span class=cF0>][</span><span class=cF2>0</span><span class=cF0>][&lt;width&gt;][</span><span class=cF2>.</span><span class=cF0>&lt;decimals&gt;][&lt;flags&gt;][</span><span class=cF2>h</span><span class=cF0>&lt;aux_fmt_num&gt;]&lt;fmt_code&gt;
<a name="l4"></a>
2024-03-23 13:40:50 +00:00
<a name="l5"></a>See </span><a href="/Wb/Kernel/StrPrint.HC#l208"><span class=cF4>StrPrintJoin</span></a><span class=cF0>().
<a name="l6"></a>
<a name="l7"></a>&lt;flags&gt;:
<a name="l8"></a>
<a name="l9"></a> </span><span class=cF2>'t'</span><span class=cF0> truncate to &lt;width&gt;.
<a name="l10"></a> </span><span class=cF2>','</span><span class=cF0> add commas every three digits or four nibbles.
<a name="l11"></a> </span><span class=cF2>'$'</span><span class=cF0> makes </span><span class=cF2>%Q</span><span class=cF0> convert </span><span class=cF2>'$'</span><span class=cF0> to </span><span class=cF2>&quot;\x24&quot;</span><span class=cF0>.
<a name="l12"></a> </span><span class=cF2>'/'</span><span class=cF0> makes </span><span class=cF2>%Q</span><span class=cF0> and </span><span class=cF2>%q</span><span class=cF0> convert </span><span class=cF2>'%'</span><span class=cF0> to </span><span class=cF2>&quot;%%&quot;</span><span class=cF0>.
<a name="l13"></a>
<a name="l14"></a>&lt;aux_fmt_num&gt;:
<a name="l15"></a>
<a name="l16"></a> For </span><span class=cF2>&quot;%n&quot;</span><span class=cF0>, </span><span class=cF2>&quot;%d&quot;</span><span class=cF0> or </span><span class=cF2>&quot;%u&quot;</span><span class=cF0>, the &lt;aux_fmt_num&gt; causes thousands mode. </span><span class=cF2>&quot;%h?n&quot;</span><span class=cF0> will
<a name="l17"></a> pick a var exponent multiples of three unit, while </span><span class=cF2>&quot;%h-3n&quot;</span><span class=cF0> will display milli
<a name="l18"></a> units or </span><span class=cF2>&quot;%h6n&quot;</span><span class=cF0> will display mega units. The </span><span class=cF2>'k'</span><span class=cF0> flag is always on for </span><span class=cF2>&quot;%n&quot;</span><span class=cF0>.
2024-03-23 13:40:50 +00:00
<a name="l19"></a> See </span><a href="/Wb/Demo/Print.HC#l1"><span class=cF4>::/Demo/Print.HC</span></a><span class=cF0>.
<a name="l20"></a>
<a name="l21"></a>For </span><span class=cF2>&quot;%c&quot;</span><span class=cF0> or </span><span class=cF2>&quot;%C&quot;</span><span class=cF0>, the &lt;aux_fmt_num&gt; repeats the char that many times.
<a name="l22"></a>
<a name="l23"></a>&lt;fmt_code&gt;:
<a name="l24"></a>
<a name="l25"></a> </span><span class=cF2>&quot;%n&quot;</span><span class=cF0> floating point in engineering notation, exponents being multiples of
<a name="l26"></a> three. If it has a &lt;aux_fmt&gt; code, it will display scientific units letters.
<a name="l27"></a>
2024-03-23 13:40:50 +00:00
<a name="l28"></a> </span><span class=cF2>&quot;%S&quot;</span><span class=cF0> </span><a href="/Wb/Kernel/KDefine.HC#l49"><span class=cF4>Define</span></a><span class=cF0>() entry.
<a name="l29"></a>
2024-03-23 13:40:50 +00:00
<a name="l30"></a> </span><span class=cF2>&quot;%C&quot;</span><span class=cF0> </span><a href="/Wb/Kernel/KernelB.HH#l58"><span class=cF4>ToUpper</span></a><span class=cF0>() character.
<a name="l31"></a>
<a name="l32"></a> </span><span class=cF2>&quot;%h25c&quot;,'\n';</span><span class=cF0> 25 new-lines.
<a name="l33"></a>
<a name="l34"></a> </span><span class=cF2>&quot;%h*c&quot;,25,'\n';</span><span class=cF0> 25 new-lines.
<a name="l35"></a>
<a name="l36"></a> </span><span class=cF2>&quot;%F&quot;</span><span class=cF0> text file by filename.
<a name="l37"></a>
2024-03-23 13:40:50 +00:00
<a name="l38"></a> </span><span class=cF2>&quot;%$F&quot;</span><span class=cF0> </span><a href="/Wb/Doc/DolDocOverview.DD.HTML#l1"><span class=cF4>DolDoc</span></a><span class=cF0> file in memory.
<a name="l39"></a>
<a name="l40"></a> </span><span class=cF2>&quot;%p&quot;</span><span class=cF0> ptr.
<a name="l41"></a>
<a name="l42"></a> </span><span class=cF2>&quot;%,p&quot;</span><span class=cF0> ptr with no offset.
<a name="l43"></a>
<a name="l44"></a> </span><span class=cF2>&quot;%P&quot;</span><span class=cF0> link to ptr.
<a name="l45"></a>
<a name="l46"></a> </span><span class=cF2>&quot;%,P&quot;</span><span class=cF0> link to ptr with no offset.
<a name="l47"></a>
2024-03-23 13:40:50 +00:00
<a name="l48"></a> </span><span class=cF2>&quot;%D&quot;</span><span class=cF0> date. Pass a </span><a href="/Wb/Kernel/KernelA.HH#l186"><span class=cF4>CDate</span></a><span class=cF0>.
<a name="l49"></a>
2024-03-23 13:40:50 +00:00
<a name="l50"></a> </span><span class=cF2>&quot;%T&quot;</span><span class=cF0> time. Pass a </span><a href="/Wb/Kernel/KernelA.HH#l186"><span class=cF4>CDate</span></a><span class=cF0>.
<a name="l51"></a>
2024-03-23 13:40:50 +00:00
<a name="l52"></a> </span><span class=cF2>&quot;%z&quot;</span><span class=cF0> sub_entry of an enumerated list of text entries. See </span><a href="/Wb/Kernel/StrA.HC#l397"><span class=cF4>LstSub</span></a><span class=cF0>(). Pass
<a name="l53"></a> sub_entry_num first, list second.
<a name="l54"></a>
2024-03-23 13:40:50 +00:00
<a name="l55"></a> </span><span class=cF2>&quot;%Z&quot;</span><span class=cF0> </span><a href="/Wb/Kernel/KDefine.HC#l13"><span class=cF4>DefineLstLoad</span></a><span class=cF0>() subentry. Pass sub_entry_num first, define_name second.
<a name="l56"></a>
<a name="l57"></a> </span><span class=cF2>&quot;%Q&quot;</span><span class=cF0> convert &quot;\&quot; to &quot;\\&quot; and quote to backslash quote. (For use in creating
<a name="l58"></a> strs in strs.)
<a name="l59"></a>
<a name="l60"></a> </span><span class=cF2>&quot;%q&quot;</span><span class=cF0> rev a </span><span class=cF2>&quot;%Q&quot;</span><span class=cF0>.
<a name="l61"></a>
<a name="l62"></a>
<a name="l63"></a></span><span class=cF5> Print Family</span><span class=cF0>
<a name="l64"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l65"></a></span><a href="/Wb/Kernel/StrPrint.HC#l898"><span class=cF4>MStrPrint</span></a><span class=cF0>(U8 *fmt,...) is like </span><a href="/Wb/Kernel/StrPrint.HC#l876"><span class=cF4>StrPrint</span></a><span class=cF0>(U8 *dst,U8 *fmt,...) but it returns a </span><span class=cF4>
<a name="l66"></a></span><a href="/Wb/Kernel/Mem/MAllocFree.HC#l387"><span class=cF4>MAlloc</span></a><span class=cF0>ated str. It is vary handy because you don't have to worry about
<a name="l67"></a>overflow.
<a name="l68"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l69"></a></span><a href="/Wb/Kernel/StrPrint.HC#l881"><span class=cF4>CatPrint</span></a><span class=cF0>(U8 *_dst,U8 *fmt,...) concatenates a formated string.
<a name="l70"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l71"></a></span><a href="/Wb/Kernel/Job.HC#l482"><span class=cF4>In</span></a><span class=cF0>(U8 *fmt,...) sends text to the current task's input buffer.</span><span class=cF4>
<a name="l72"></a></span><a href="/Wb/Kernel/Job.HC#l464"><span class=cF4>InStr</span></a><span class=cF0>(U8 *fmt,...) sends text of an </span><a href="/Wb/Doc/Glossary.DD.HTML#l260"><span class=cF4>InFile</span></a><span class=cF0> to the keyboard stream of the current
<a name="l73"></a>TASK but can also do mouse cmds.
<a name="l74"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l75"></a></span><a href="/Wb/Kernel/Job.HC#l445"><span class=cF4>XTalk</span></a><span class=cF0>(CTask *task,U8 *fmt,...) and text to another task's input buffer.</span><span class=cF4>
<a name="l76"></a></span><a href="/Wb/Kernel/Job.HC#l489"><span class=cF4>XTalkStr</span></a><span class=cF0>(CTask *task,U8 *fmt,...) sends text of an </span><a href="/Wb/Doc/Glossary.DD.HTML#l260"><span class=cF4>InFile</span></a><span class=cF0> to the keyboard stream
<a name="l77"></a>of another TASK but can also do mouse cmds.
<a name="l78"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l79"></a></span><a href="/Wb/Adam/DolDoc/DocPutS.HC#l148"><span class=cF4>DocPrint</span></a><span class=cF0>(CDoc *doc,U8 *fmt,...) sends text to a document. You can buffer to a
<a name="l80"></a>Doc and save it, providing the functionality of </span><span class=cF2>fprintf</span><span class=cF0>. See </span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l81"></a></span><a href="/Wb/Demo/Dsk/FPrintF.HC#l1"><span class=cF4>::/Demo/Dsk/FPrintF.HC</span></a><span class=cF0>.
<a name="l82"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l83"></a></span><a href="/Wb/Kernel/Job.HC#l406"><span class=cF4>Adam</span></a><span class=cF0>(U8 *fmt,...) sends text to the </span><a href="/Wb/Doc/Glossary.DD.HTML#l171"><span class=cF4>Adam Task</span></a><span class=cF0> to be compiled and run.</span><span class=cF4>
<a name="l84"></a></span><a href="/Wb/Kernel/Job.HC#l423"><span class=cF4>AdamLog</span></a><span class=cF0>(U8 *fmt,...) and </span><a href="/Wb/Kernel/Job.HC#l433"><span class=cF4>AdamErr</span></a><span class=cF0>(U8 *fmt,...) send text to the </span><a href="/Wb/Doc/Glossary.DD.HTML#l171"><span class=cF4>Adam Task</span></a><span class=cF0> to be
<a name="l85"></a>displayed.
<a name="l86"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l87"></a></span><a href="/Wb/Compiler/CMisc.HC#l68"><span class=cF4>StreamPrint</span></a><span class=cF0>(U8 *fmt,...) sends text to the stream of code being compiled and
<a name="l88"></a>must reside in a </span><span class=cF2>#exe{}</span><span class=cF0> blk.
<a name="l89"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l90"></a></span><a href="/Wb/Adam/Gr/GrBitMap.HC#l989"><span class=cF4>GrPrint</span></a><span class=cF0>(CDC *dc,I64 x,I64 y,U8 *fmt,...) and </span><a href="/Wb/Adam/Gr/GrBitMap.HC#l998"><span class=cF4>GrVPrint</span></a><span class=cF0>() plots text in graphics
<a name="l91"></a>mode.
<a name="l92"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l93"></a></span><a href="/Wb/Adam/Gr/GrTextBase.HC#l321"><span class=cF4>TextPrint</span></a><span class=cF0>(CTask *task,I64 x,I64 y,I64 attr,U8 *fmt,...) plots to </span><span class=cF4><u>gr.text_base</u></span><span class=cF0>.
<a name="l94"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l95"></a></span><a href="/Wb/Compiler/CMain.HC#l605"><span class=cF4>ExePrint</span></a><span class=cF0>(U8 *fmt,...) compiles and execute a string. Note: It returns the res
<a name="l96"></a>of the last executed expression.
<a name="l97"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l98"></a></span><a href="/Wb/Adam/ARegistry.HC#l144"><span class=cF4>Once</span></a><span class=cF0>(U8 *fmt,...) Writes User code to </span><a href="/Wb/Home/Registry.HC#l1"><span class=cF4>Registry</span></a><span class=cF0> to be executed next boot.
<a name="l99"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l100"></a></span><a href="/Wb/Adam/ARegistry.HC#l135"><span class=cF4>AOnce</span></a><span class=cF0>(U8 *fmt,...) Writes Adam code to </span><a href="/Wb/Home/Registry.HC#l1"><span class=cF4>Registry</span></a><span class=cF0> to be executed next boot.
<a name="l101"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l102"></a></span><a href="/Wb/Adam/InFile.HC#l26"><span class=cF4>InPrint</span></a><span class=cF0>(I64 mS,U8 *fmt,...) </span><a href="/Wb/Kernel/KeyDev.HC#l20"><span class=cF4>PutChars</span></a><span class=cF0>()s one at a time with a delay.
<a name="l103"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l104"></a></span><a href="/Wb/Kernel/KDbg.HC#l217"><span class=cF4>RawPrint</span></a><span class=cF0>(I64 mS,U8 *fmt,...) sends direct to scrn memory, bypassing window
<a name="l105"></a>manager.
<a name="l106"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l107"></a></span><a href="/Wb/Kernel/KTask.HC#l424"><span class=cF4>User</span></a><span class=cF0>(U8 *fmt,...) Spawns a user and execute a string on start-up.
<a name="l108"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l109"></a></span><a href="/Wb/Kernel/Job.HC#l397"><span class=cF4>PopUpPrint</span></a><span class=cF0>(U8 *fmt,...) compiles and execute a string in a pop-up win. Note: It
<a name="l110"></a>returns the res of the last executed expression.</span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l111"></a></span><a href="/Wb/Adam/DolDoc/DocPopUp.HC#l11"><span class=cF4>PopUpViewPrint</span></a><span class=cF0>(U8 *fmt,...) creates a pop-up window and views text.
<a name="l112"></a>
<a name="l113"></a><blink>Note:</blink> Use </span><span class=cF2>Print(&quot;%s&quot;,src)</span><span class=cF0> if you need an unmodified string.
</span></pre></body>
</html>