| 9 |
|
][ |
| 10 |
|
.B \-l |
| 11 |
|
][ |
| 12 |
< |
.B \-p |
| 12 |
> |
.B "\-p | \-P" |
| 13 |
|
][ |
| 14 |
|
.B \-n |
| 15 |
|
][ |
| 87 |
|
.I \-p |
| 88 |
|
option specifies "passive mode," where characters that do not |
| 89 |
|
match the input format are passed unaltered to the output. |
| 90 |
< |
This option has no effect unless |
| 90 |
> |
If the |
| 91 |
> |
.I \-P |
| 92 |
> |
option is given instead, then valid input records that do not |
| 93 |
> |
yield a positive |
| 94 |
> |
.I cond |
| 95 |
> |
value are similarly passed to the output. |
| 96 |
> |
(See paragraph below.)\0 |
| 97 |
> |
These options options require that the |
| 98 |
|
.I \-i |
| 99 |
< |
is also specified, and does not make much sense unless |
| 99 |
> |
input format and |
| 100 |
|
.I \-o |
| 101 |
< |
is also given. |
| 101 |
> |
output format also be present. |
| 102 |
|
With both input and output formats, the passive mode can |
| 103 |
|
effectively substitute information in the middle of a file |
| 104 |
|
or stream without affecting the rest of the data. |
| 257 |
|
is positive, output is produced. |
| 258 |
|
If |
| 259 |
|
.I cond |
| 260 |
< |
is less than or equal to zero, the record is skipped and no other expressions |
| 260 |
> |
is less than or equal to zero, the record is skipped (or passed to the |
| 261 |
> |
output if |
| 262 |
> |
.I \-P |
| 263 |
> |
is specified) and no other expressions |
| 264 |
|
are evaluated. |
| 265 |
|
This provides a convenient method for avoiding inappropriate calculations. |
| 266 |
|
The following library of pre-defined functions and variables is provided: |
| 280 |
|
the $N notation, and is more flexible since it is programmable. |
| 281 |
|
This function is disabled if an input format is used. |
| 282 |
|
.TP |
| 283 |
< |
.BR "if(cond, then, else)" |
| 284 |
< |
if cond is greater than zero, |
| 283 |
> |
.BR "if(test, then, else)" |
| 284 |
> |
if test is greater than zero, |
| 285 |
|
then is evaluated, otherwise else is evaluated. |
| 286 |
|
This function is necessary for recursive definitions. |
| 287 |
|
.TP |
| 351 |
|
options, not in definitions. |
| 352 |
|
.PP |
| 353 |
|
Tabs count as single spaces inside fields. |
| 354 |
+ |
.PP |
| 355 |
+ |
The |
| 356 |
+ |
.I \-P |
| 357 |
+ |
option buffers up to 16 Kbytes of data per record. |
| 358 |
+ |
Longer records passed because the "cond" variable |
| 359 |
+ |
evaluates to <= 0 will be partial; a warning will |
| 360 |
+ |
be generated and the string "*** MISSING DATA ***" |
| 361 |
+ |
will appear at the break. |
| 362 |
+ |
The only workaround is to use the |
| 363 |
+ |
.I \-p |
| 364 |
+ |
option instead, which does not pass rejected records. |
| 365 |
|
.SH "SEE ALSO" |
| 366 |
|
cnt(1), ev(1), getinfo(1), icalc(1), rcollate(1), rlam(1), |
| 367 |
|
rsplit(1), tabfunc(1), total(1) |