| 1 |
< |
.\" RCSid "$Id" |
| 1 |
> |
.\" RCSid "$Id$" |
| 2 |
|
.TH RCALC 1 4/6/99 RADIANCE |
| 3 |
|
.SH NAME |
| 4 |
|
rcalc - record calculator |
| 38 |
|
The |
| 39 |
|
.I \-tS |
| 40 |
|
option is used to specify an alternate tab character. |
| 41 |
+ |
.PP |
| 42 |
|
A |
| 43 |
|
.I \-i format |
| 44 |
|
option specifies a template for an alternate |
| 49 |
|
the format specification. |
| 50 |
|
In either case, if the format does not end with a newline, one will be added |
| 51 |
|
automatically. |
| 52 |
+ |
A special form of the |
| 53 |
+ |
.I \-i |
| 54 |
+ |
option may be followed immediately by a 'd' or an 'f' and an optional |
| 55 |
+ |
count, which defaults to 1, indicating the number of double or float |
| 56 |
+ |
binary values to read per record on the input file. |
| 57 |
+ |
If binary input is specified, no format string or file is needed. |
| 58 |
+ |
.PP |
| 59 |
|
A |
| 60 |
|
.I \-o format |
| 61 |
|
option specifies an alternate output record format. |
| 62 |
< |
It is interpreted the same as an input specification. |
| 62 |
> |
It is interpreted the same as an input specification, except that |
| 63 |
> |
the special |
| 64 |
> |
.I \-od |
| 65 |
> |
or |
| 66 |
> |
.I \-of |
| 67 |
> |
options do not require a count, as this will be determined by the |
| 68 |
> |
number of output channels in the given expressions. |
| 69 |
> |
.PP |
| 70 |
|
The variable and function definitions in each |
| 71 |
|
.I \-f source |
| 72 |
|
file are read and compiled. |
| 80 |
|
option can be used to assign a string variable a string value. |
| 81 |
|
If this string variable appears in an input format, only records |
| 82 |
|
with the specified value will be processed. |
| 83 |
+ |
.PP |
| 84 |
|
The |
| 85 |
|
.I \-b |
| 86 |
|
option instructs the program to accept only exact matches. |
| 95 |
|
With the |
| 96 |
|
.I \-l |
| 97 |
|
option, the input format can match anywhere on a line. |
| 98 |
+ |
.PP |
| 99 |
|
The |
| 100 |
|
.I \-w |
| 101 |
|
option causes non-fatal error messages (such as division by zero) to |
| 209 |
|
This provides a convenient method for avoiding inappropriate calculations. |
| 210 |
|
The following library of pre-defined functions and variables is provided: |
| 211 |
|
.TP 10n |
| 212 |
+ |
.BR "in(n)" |
| 213 |
+ |
Return the value for input column |
| 214 |
+ |
.I n, |
| 215 |
+ |
or the number of columns available in this record if |
| 216 |
+ |
.I n |
| 217 |
+ |
is 0. |
| 218 |
+ |
This is an alternate way to get a column value instead of using |
| 219 |
+ |
the $N notation, and is more flexible since it is programmable. |
| 220 |
+ |
This function is disabled if an input format is used. |
| 221 |
+ |
.TP |
| 222 |
|
.BR "if(cond, then, else)" |
| 223 |
|
if cond is greater than zero, |
| 224 |
|
then is evaluated, otherwise else is evaluated. |
| 283 |
|
.PP |
| 284 |
|
Tabs count as single spaces inside fields. |
| 285 |
|
.SH "SEE ALSO" |
| 286 |
< |
calc(1), cnt(1), ev(1), lam(1), tabfunc(1), total(1) |
| 286 |
> |
calc(1), cnt(1), ev(1), getinfo(1), lam(1), tabfunc(1), total(1) |