ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rcalc.1
(Generate patch)

Comparing ray/doc/man/man1/rcalc.1 (file contents):
Revision 1.13 by greg, Tue Oct 10 16:10:14 2017 UTC vs.
Revision 1.16 by greg, Fri Mar 11 22:50:13 2022 UTC

# Line 9 | Line 9 | rcalc - record calculator
9   ][
10   .B \-l
11   ][
12 < .B \-p
12 > .B "\-p | \-P"
13   ][
14   .B \-n
15   ][
# Line 87 | Line 87 | The
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.
# Line 250 | Line 257 | If
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:
# Line 270 | Line 280 | This is an alternate way to get a column value instead
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
# Line 285 | Line 295 | is zero, the number of available arguments is returned
295   .BR "rand(x)"
296   compute a random number between 0 and 1 based on x.
297   .TP
298 + .BR "min(a1, a2, ..)"
299 + return the minimum value from a list of arguments.
300 + .TP
301 + .BR "max(a1, a2, ..)"
302 + return the maximum value from a list of arguments.
303 + .TP
304   .BR "floor(x)"
305   return largest integer not greater than x.
306   .TP
# Line 324 | Line 340 | inverse tangent of y/x (range \-pi to pi).
340   To print the square root of column two in column one,
341   and column one times column three in column two:
342   .IP "" .2i
343 < rcalc \-e '$1=sqrt($2);$2=$1*$3' inputfile > outputfile
343 > rcalc -e '$1=sqrt($2);$2=$1*$3' inputfile > outputfile
344   .SH ENVIRONMENT
345   RAYPATH         the directories to check for auxiliary files.
346   .SH AUTHOR
# Line 336 | Line 352 | options, not in definitions.
352   .PP
353   Tabs count as single spaces inside fields.
354   .SH "SEE ALSO"
355 < cnt(1), ev(1), getinfo(1), icalc(1), rcollate(1), rlam(1), tabfunc(1), total(1)
355 > cnt(1), ev(1), getinfo(1), icalc(1), rcollate(1), rlam(1),
356 > rsplit(1), tabfunc(1), total(1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines