| 1 |
< |
.\" RCSid "$Id" |
| 1 |
> |
.\" RCSid "$Id$" |
| 2 |
|
.TH RCALC 1 4/6/99 RADIANCE |
| 3 |
|
.SH NAME |
| 4 |
|
rcalc - record calculator |
| 9 |
|
][ |
| 10 |
|
.B \-l |
| 11 |
|
][ |
| 12 |
+ |
.B \-p |
| 13 |
+ |
][ |
| 14 |
|
.B \-n |
| 15 |
|
][ |
| 16 |
|
.B \-w |
| 69 |
|
options do not require a count, as this will be determined by the |
| 70 |
|
number of output channels in the given expressions. |
| 71 |
|
.PP |
| 72 |
+ |
The |
| 73 |
+ |
.I \-p |
| 74 |
+ |
option specifies "passive mode," where characters that do not |
| 75 |
+ |
match the input format are passed unaltered to the output. |
| 76 |
+ |
This option has no effect unless |
| 77 |
+ |
.I \-i |
| 78 |
+ |
is also specified, and does not make much sense unless |
| 79 |
+ |
.I \-o |
| 80 |
+ |
is also given. |
| 81 |
+ |
With both input and output formats, the passive mode can |
| 82 |
+ |
effectively substitute information in the middle of a file |
| 83 |
+ |
or stream without affecting the rest of the data. |
| 84 |
+ |
.PP |
| 85 |
|
The variable and function definitions in each |
| 86 |
|
.I \-f source |
| 87 |
|
file are read and compiled. |
| 224 |
|
This provides a convenient method for avoiding inappropriate calculations. |
| 225 |
|
The following library of pre-defined functions and variables is provided: |
| 226 |
|
.TP 10n |
| 227 |
+ |
.BR "in(n)" |
| 228 |
+ |
Return the value for input column |
| 229 |
+ |
.I n, |
| 230 |
+ |
or the number of columns available in this record if |
| 231 |
+ |
.I n |
| 232 |
+ |
is 0. |
| 233 |
+ |
This is an alternate way to get a column value instead of using |
| 234 |
+ |
the $N notation, and is more flexible since it is programmable. |
| 235 |
+ |
This function is disabled if an input format is used. |
| 236 |
+ |
.TP |
| 237 |
|
.BR "if(cond, then, else)" |
| 238 |
|
if cond is greater than zero, |
| 239 |
|
then is evaluated, otherwise else is evaluated. |
| 298 |
|
.PP |
| 299 |
|
Tabs count as single spaces inside fields. |
| 300 |
|
.SH "SEE ALSO" |
| 301 |
< |
calc(1), cnt(1), ev(1), getinfo(1), lam(1), tabfunc(1), total(1) |
| 301 |
> |
cnt(1), ev(1), getinfo(1), icalc(1), rlam(1), tabfunc(1), total(1) |