initial commit
[bills-tools.git] / calc / README
blob0c472f7f6c67e11058ca66e01d02969ea3b4602e
1 Calc parses the text in a window and finds variables of the form /[a-zA-Z0-9_]+ *= *[0-9e.+\-]*/  It sends the values to standard input of the script at the bottom of the window (which starts with /^#!/), one variable per line, <name>=<value> (variables without values are given as 0).  The script is expected to output changed variables, one per line, in the same format.  Calc parses those values and replaces them in the Acme window.
3 Installation: put calcrc, calcgo and calc in your path.
5 To use calcgo, you need to have Go installed.  You can use calcrc with normal Plan9 tools.
7  view this file in Acme and middle-click 'calc' a few times to watch y and z change.
9 x    =   3   , y= 25
10 z=27
12 To use calcrc, delete from here up to /* END
13 #!/usr/bin/env calcgo
14 z=x + y
15 y++
17 /* END
19 #!/usr/bin/env calcrc
20 z=`{expr $x + $y}
21 y=`{expr $y + 1}
23 #*/