Print Format Strs
<format_arg> := %[-][0][<width>][.<decimals>][<flags>][h<aux_format_num>]<format_code>
See StrPrintJoin().
<flags>:
't' truncate to <width>.
',' add commas every three digits or four nibbles.
'$' makes %Q convert '$' to "\x24".
'/' makes %Q and %q convert '%' to "%%".
<aux_format_num>:
For "%n", "%d" or "%u", the <aux_format_num> causes thousands mode. "%h?n" will pick a variable exponent multiples of three
unit, while "%h-3n" will display milli units or "%h6n" will display mega units. The 'k' flag is always on for "%n". See
::/Demo/Print.ZC.
For "%c" or "%C", the <aux_format_num> repeats the char that many times.
<format_code>:
"%n" floating point in engineering notation, exponents being multiples of three. If it has a <aux_format> code, it will
display scientific units letters.
"%e" floating point in engineering notation, exponents not restricted to multiples of three.
"%d" Whole number.
"%u" Unsigned whole number.
"%f" Floating point number.
"%g" Right-aligned rounded-up integer of floating point number.
"%S" Define() entry.
"%C" ToUpper() character.
"%h25c",'\n'; 25 new-lines.
"%h*c",25,'\n'; 25 new-lines.
"%F" text file by filename.
"%$F" DolDoc file in memory.
"%p" pointer.
"%,p" pointer with no offset.
"%P" link to pointer.
"%,P" link to pointer with no offset.
"%D" date. Pass a CDate.
"%T" time. Pass a CDate.
"%z" sub_entry of an enumerated list of text entries. See ListSub(). Pass sub_entry_num first, list second.
"%Z" DefineListLoad() subentry. Pass sub_entry_num first, define_name second.
"%Q" convert "\" to "\\" and quote to backslash quote. (For use in creating strs in strs.)
"%q" rev a "%Q".
"%x" Hex number.
"%b" Binary number.
"%o" Bool.
Print Family
MStrPrint(U8 *format, ...) is like StrPrint(U8 *dst,U8 *format,...) but it returns a MAllocated str. It is vary handy because
you don't have to worry about overflow.
CatPrint(U8 *_dst, U8 *format, ...) concatenates a formated string.
In(U8 *format, ...) sends text to the current task's input buffer.
InStr(U8 *format, ...) sends text of an InFile to the keyboard stream of the current TASK but can also do mouse cmds.
XTalk(CTask *task, U8 *format, ...) and text to another task's input buffer.
XTalkStr(CTask *task, U8 *format, ...) sends text of an InFile to the keyboard stream of another TASK but can also do mouse
cmds.
DocPrint(CDoc *doc, U8 *format, ...) sends text to a document. You can buffer to a Doc and save it, providing the
functionality of fprintf. See ::/Demo/Disk/FPrintF.ZC.
Sys(U8 *format, ...) sends text to the System Task to be compiled and run.
SysLog(U8 *format, ...) and SysErr(U8 *format,...) send text to the System Task to be displayed.
StreamPrint(U8 *format, ...) sends text to the stream of code being compiled and must reside in a #exe{} block.
GrPrint(CDC *dc, I64 x, I64 y, U8 *format,...) and GrVPrint() plots text in graphics mode.
TextPrint(CTask *task, I64 x, I64 y, I64 attr, U8 *format, ...) plots to gr.text_base.
ExePrint(U8 *format, ...) compiles and execute a string. Note: It returns the res of the last executed expression.
Once(U8 *format, ...) Writes User code to Registry to be executed next boot.
SysOnce(U8 *format, ...) Writes System code to Registry to be executed next boot.
InPrint(I64 mS, U8 *format, ...) PutChars()s one at a time with a delay.
RawPrint(I64 mS, U8 *format, ...) sends direct to screen memory, bypassing window manager.
User(U8 *format, ...) Spawns a user and execute a string on start-up.
PopUpPrint(U8 *format, ...) compiles and execute a string in a pop-up win. Note: It returns the res of the last executed
expression.
PopUpViewPrint(U8 *format, ...) creates a pop-up window and views text.
Use Print("%s",src) if you need an unmodified string.