User Tools

Site Tools


jvs:fscan:manual:chapter2:tableprintf

This is an old revision of the document!


fScan Reference Manual, Chapter 2 (CmdLineOptions): table_printf

Table printf -- show formatted table data

usage: -table printf TBLNAME FLAG FORMATSTR [OUTFILE]

The PRINTF option allows you to specify a format string to print out each table row. The format string uses format conversion codes starting with a '%' and ending with a '#', as in:
%W.PcN#
W (width) and P (precision) are optional number values, indicating the width (in character spaces) and precision (values after the decimal point for numbers) to use in the display. If W is omitted there is no text padding.
The 'cN' specification indicates which table column value to insert in this location, where N is the column number (1-ncolumns). The format conversion string %W.PcN# will be converted to a C-style string, either “%W.Ps” or “%W.Pf”, depending on whether the specified column contains text or numerical data.

There are 5 other special case conversion strings:
%W# - this will be replaced by the current row number (as %Wd)
% % - this will print out as a single '%' character
\t - replaced with <Tab> character
\n - replaced with <Newline> character
\r - replaced with <Return> character

All other text characters in the format string will be copied directly to each line of output.

See Also:
Table, Table Show, Browse

fScan Home, fScan Manual, CmdLineOptions, Manual Help

jvs/fscan/manual/chapter2/tableprintf.1395678987.txt.gz · Last modified: 2014/08/04 16:03 (external edit)