TextTools - General Features Revised 2-Jan-99. Copyright © 1996-99 by Rune Berg. TextTools Freeware. |
The Programs | Top |
Coloured Responses |
As of Release 6, the Win32 executables colour non-functional responses, like banners, error messages, etc.
The colours were chosen to be useful against a black console window background.
You cannot change the colour scheme, but you can turn off colouring by setting an environment variable:
TTCOLOURS=OFF
The -v Option |
Every TextTools program can be invoked with the -v option, e.g.:
itabs -vThis makes the program print its copyright banner and a brief description of usage and functionality, e.g.:
itabs v1.20 (BC, Win32, Aug 2 1997) - Copyright (c) 1996-97 by Rune Berg usage: itabs [log logfile] [options] [infile] [to outfile] itabs copies infile to outfile, replacing every sequence of spaces ending at a tab pos. by a real tab char. options: -q Don't insert tabs inside double or single quotes -l Only insert tabs in place of leading spaces -nr Don't print report -v This banner, exit -nX Use X (2..128) spaces instead of the default 3
and then exit with return code 0 (success).
DOS End-of-file Character |
TextTools programs never print a DOS end-of-file character (Ctrl-Z, hex 1a) when producing an output file, even if the input file was terminated by such a character. With two exceptions:
Return Codes |
Here's a more detailed explanation of the return codes of TextTools programs.
Max. Input Line Length |
Most of the TextTools programs read text lines from an input file. The maximum length of such lines is [on DOS: 255; on Win32: 1024] characters, not counting (carriage return and) newline.
Max. Number Of Fields Per Line |
For TextTools programs that break input text lines into fields, the maximum number of fields per line is [on DOS: 100; on Win32: 400].
Floating Point Numbers |
General
As of R6, certain TextTools programs (tcols, trows, tsort, tuniq, sum, tand, and tjoin) can recognize, process, and output floating point numbers. These numbers are of the forms:
3.3 -0.001 3.44e6 1.1e-01
That is, regular "numbers with decimal places" or "scientific format" (where "en" should be read as "times 10 to the power of n").
Applicability
The floating point support in these programs is intended for "everyday" quantities, not rocket science. Little testing has been done to verify the quality of extreme calculations. Specifically, calculations will fail when encountering special values such as +/-NAN and +/-INF.
Theoretically, the range of floating point numbers is (+/-) 1.7e-308 to (+/-) 1.7e+308.
In practice, I recommend you stick to input values and results in the range (+/-) 1.0e-15 to (+/-) 1.0e+20.
Accuracy
By default, floating point calculations, comparisons, intermediate (internal) storage, and output has a precision of six decimal digits. You can, however, adjust this precision to between 0 and 15 decimal digits, using the -fpp option. A precision of, say, 3 digits means that the 4th etc. digits are rounded off: 3.1114 becomes 3.111; 3.1116 becomes 3.112. Note, however, that certain floating point numbers cannot be accurately represented, and may cause border-line case rounding to tilt the wrong way.
Special case: Precision 0 means the number is rounded to the nearest integer (whole) value. The '.' is lost.
The Documentation | Top |
Conventions Used |
Examples of command invokations are in a dark red monotype font, e.g.:
itabs -n5 myinput.txt to myoutput.txtExamples of input or output data are shown in a dark green monotype font, e.g.:
7787 'John Smith' London
End of document |