145 lines
13 KiB
HTML
Executable File
145 lines
13 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="generator" content="TempleOS V5.03">
|
|
<meta name="viewport" content="width=device-width">
|
|
<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>
|
|
<pre id="content">
|
|
<a name="l1"></a><span class=cF5> Print Fmt Strs</span><span class=cF0>
|
|
<a name="l2"></a>
|
|
<a name="l3"></a><fmt_arg> := </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>][<width>][</span><span class=cF2>.</span><span class=cF0><decimals>][<flags>][</span><span class=cF2>h</span><span class=cF0><aux_fmt_num>]<fmt_code>
|
|
<a name="l4"></a>
|
|
<a name="l5"></a>See </span><a href="/Wb/Kernel/StrPrint.HC.HTML#l208"><span class=cF4>StrPrintJoin</span></a><span class=cF0>().
|
|
<a name="l6"></a>
|
|
<a name="l7"></a><flags>:
|
|
<a name="l8"></a>
|
|
<a name="l9"></a> </span><span class=cF2>'t'</span><span class=cF0> truncate to <width>.
|
|
<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>"\x24"</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>"%%"</span><span class=cF0>.
|
|
<a name="l13"></a>
|
|
<a name="l14"></a><aux_fmt_num>:
|
|
<a name="l15"></a>
|
|
<a name="l16"></a> For </span><span class=cF2>"%n"</span><span class=cF0>, </span><span class=cF2>"%d"</span><span class=cF0> or </span><span class=cF2>"%u"</span><span class=cF0>, the <aux_fmt_num> causes thousands mode. </span><span class=cF2>"%h?n"</span><span class=cF0> will
|
|
<a name="l17"></a> pick a var exponent multiples of three unit, while </span><span class=cF2>"%h-3n"</span><span class=cF0> will display milli
|
|
<a name="l18"></a> units or </span><span class=cF2>"%h6n"</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>"%n"</span><span class=cF0>.
|
|
<a name="l19"></a> See </span><a href="/Wb/Demo/Print.HC.HTML#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>"%c"</span><span class=cF0> or </span><span class=cF2>"%C"</span><span class=cF0>, the <aux_fmt_num> repeats the char that many times.
|
|
<a name="l22"></a>
|
|
<a name="l23"></a><fmt_code>:
|
|
<a name="l24"></a>
|
|
<a name="l25"></a> </span><span class=cF2>"%n"</span><span class=cF0> floating point in engineering notation, exponents being multiples of
|
|
<a name="l26"></a> three. If it has a <aux_fmt> code, it will display scientific units letters.
|
|
<a name="l27"></a>
|
|
<a name="l28"></a> </span><span class=cF2>"%S"</span><span class=cF0> </span><a href="/Wb/Kernel/KDefine.HC.HTML#l49"><span class=cF4>Define</span></a><span class=cF0>() entry.
|
|
<a name="l29"></a>
|
|
<a name="l30"></a> </span><span class=cF2>"%C"</span><span class=cF0> </span><a href="/Wb/Kernel/KernelB.HH.HTML#l58"><span class=cF4>ToUpper</span></a><span class=cF0>() character.
|
|
<a name="l31"></a>
|
|
<a name="l32"></a> </span><span class=cF2>"%h25c",'\n';</span><span class=cF0> 25 new-lines.
|
|
<a name="l33"></a>
|
|
<a name="l34"></a> </span><span class=cF2>"%h*c",25,'\n';</span><span class=cF0> 25 new-lines.
|
|
<a name="l35"></a>
|
|
<a name="l36"></a> </span><span class=cF2>"%F"</span><span class=cF0> text file by filename.
|
|
<a name="l37"></a>
|
|
<a name="l38"></a> </span><span class=cF2>"%$F"</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>"%p"</span><span class=cF0> ptr.
|
|
<a name="l41"></a>
|
|
<a name="l42"></a> </span><span class=cF2>"%,p"</span><span class=cF0> ptr with no offset.
|
|
<a name="l43"></a>
|
|
<a name="l44"></a> </span><span class=cF2>"%P"</span><span class=cF0> link to ptr.
|
|
<a name="l45"></a>
|
|
<a name="l46"></a> </span><span class=cF2>"%,P"</span><span class=cF0> link to ptr with no offset.
|
|
<a name="l47"></a>
|
|
<a name="l48"></a> </span><span class=cF2>"%D"</span><span class=cF0> date. Pass a </span><a href="/Wb/Kernel/KernelA.HH.HTML#l186"><span class=cF4>CDate</span></a><span class=cF0>.
|
|
<a name="l49"></a>
|
|
<a name="l50"></a> </span><span class=cF2>"%T"</span><span class=cF0> time. Pass a </span><a href="/Wb/Kernel/KernelA.HH.HTML#l186"><span class=cF4>CDate</span></a><span class=cF0>.
|
|
<a name="l51"></a>
|
|
<a name="l52"></a> </span><span class=cF2>"%z"</span><span class=cF0> sub_entry of an enumerated list of text entries. See </span><a href="/Wb/Kernel/StrA.HC.HTML#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>
|
|
<a name="l55"></a> </span><span class=cF2>"%Z"</span><span class=cF0> </span><a href="/Wb/Kernel/KDefine.HC.HTML#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>"%Q"</span><span class=cF0> convert "\" to "\\" 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>"%q"</span><span class=cF0> rev a </span><span class=cF2>"%Q"</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>
|
|
<a name="l65"></a></span><a href="/Wb/Kernel/StrPrint.HC.HTML#l898"><span class=cF4>MStrPrint</span></a><span class=cF0>(U8 *fmt,...) is like </span><a href="/Wb/Kernel/StrPrint.HC.HTML#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.HTML#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>
|
|
<a name="l69"></a></span><a href="/Wb/Kernel/StrPrint.HC.HTML#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>
|
|
<a name="l71"></a></span><a href="/Wb/Kernel/Job.HC.HTML#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.HTML#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>
|
|
<a name="l75"></a></span><a href="/Wb/Kernel/Job.HC.HTML#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.HTML#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>
|
|
<a name="l79"></a></span><a href="/Wb/Adam/DolDoc/DocPutS.HC.HTML#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>
|
|
<a name="l81"></a></span><a href="/Wb/Demo/Dsk/FPrintF.HC.HTML#l1"><span class=cF4>::/Demo/Dsk/FPrintF.HC</span></a><span class=cF0>.
|
|
<a name="l82"></a></span><span class=cF4>
|
|
<a name="l83"></a></span><a href="/Wb/Kernel/Job.HC.HTML#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.HTML#l423"><span class=cF4>AdamLog</span></a><span class=cF0>(U8 *fmt,...) and </span><a href="/Wb/Kernel/Job.HC.HTML#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>
|
|
<a name="l87"></a></span><a href="/Wb/Compiler/CMisc.HC.HTML#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>
|
|
<a name="l90"></a></span><a href="/Wb/Adam/Gr/GrBitMap.HC.HTML#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.HTML#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>
|
|
<a name="l93"></a></span><a href="/Wb/Adam/Gr/GrTextBase.HC.HTML#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>
|
|
<a name="l95"></a></span><a href="/Wb/Compiler/CMain.HC.HTML#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>
|
|
<a name="l98"></a></span><a href="/Wb/Adam/ARegistry.HC.HTML#l144"><span class=cF4>Once</span></a><span class=cF0>(U8 *fmt,...) Writes User code to </span><a href="/Wb/Home/Registry.HC.HTML#l1"><span class=cF4>Registry</span></a><span class=cF0> to be executed next boot.
|
|
<a name="l99"></a></span><span class=cF4>
|
|
<a name="l100"></a></span><a href="/Wb/Adam/ARegistry.HC.HTML#l135"><span class=cF4>AOnce</span></a><span class=cF0>(U8 *fmt,...) Writes Adam code to </span><a href="/Wb/Home/Registry.HC.HTML#l1"><span class=cF4>Registry</span></a><span class=cF0> to be executed next boot.
|
|
<a name="l101"></a></span><span class=cF4>
|
|
<a name="l102"></a></span><a href="/Wb/Adam/InFile.HC.HTML#l26"><span class=cF4>InPrint</span></a><span class=cF0>(I64 mS,U8 *fmt,...) </span><a href="/Wb/Kernel/KeyDev.HC.HTML#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>
|
|
<a name="l104"></a></span><a href="/Wb/Kernel/KDbg.HC.HTML#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>
|
|
<a name="l107"></a></span><a href="/Wb/Kernel/KTask.HC.HTML#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>
|
|
<a name="l109"></a></span><a href="/Wb/Kernel/Job.HC.HTML#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>
|
|
<a name="l111"></a></span><a href="/Wb/Adam/DolDoc/DocPopUp.HC.HTML#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("%s",src)</span><span class=cF0> if you need an unmodified string.
|
|
</span></pre></body>
|
|
</html>
|