--- ray/doc/man/man1/rcalc.1 2007/09/04 17:36:41 1.8 +++ ray/doc/man/man1/rcalc.1 2013/12/19 16:38:12 1.11 @@ -1,4 +1,4 @@ -.\" RCSid "$Id: rcalc.1,v 1.8 2007/09/04 17:36:41 greg Exp $" +.\" RCSid "$Id: rcalc.1,v 1.11 2013/12/19 16:38:12 greg Exp $" .TH RCALC 1 4/6/99 RADIANCE .SH NAME rcalc - record calculator @@ -94,7 +94,7 @@ or stream without affecting the rest of the data. .PP The variable and function definitions in each .I \-f source -file are read and compiled. +file are read and compiled from the RADIANCE library where it is found. The .I \-e expr option can be used to define variables on the command line. @@ -202,7 +202,8 @@ and the following operators: .PP + - * / ^ .PP -Operators are evaluated left to right. +Operators are evaluated left to right, except '^', +which is right associative. Powers have the highest precedence; multiplication and division are evaluated before addition and subtraction. Expressions can be grouped with parentheses. @@ -234,6 +235,11 @@ are evaluated. This provides a convenient method for avoiding inappropriate calculations. The following library of pre-defined functions and variables is provided: .TP 10n +.BR \$N +Return the value for input column +.I N. +If an input format is given, using a channel number generates an error. +.TP .BR "in(n)" Return the value for input column .I n, @@ -299,6 +305,8 @@ To print the square root of column two in column one, and column one times column three in column two: .IP "" .2i rcalc \-e '$1=sqrt($2);$2=$1*$3' inputfile > outputfile +.SH ENVIRONMENT +RAYPATH the directories to check for auxiliary files. .SH AUTHOR Greg Ward .SH BUGS @@ -308,4 +316,4 @@ options, not in definitions. .PP Tabs count as single spaces inside fields. .SH "SEE ALSO" -cnt(1), ev(1), getinfo(1), icalc(1), rlam(1), tabfunc(1), total(1) +cnt(1), ev(1), getinfo(1), icalc(1), rcollate(1), rlam(1), tabfunc(1), total(1)