added LICENSE files
[bills-tools.git] / calc / README
blobc5ef619c3e78a441bf9c2de24cdd9f1b4b6e858a
1 calc, (c) Oct, 2010, by Bill Burdick
2 licensed with the ZLIB license (see the LICENSE file)
4 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.
6 Installation: put calcrc, calcgo and calc in your path.
8 To use calcgo, you need to have Go installed.  You can use calcrc with normal Plan9 tools.
10  view this file in Acme and middle-click 'calc' a few times to watch y and z change.
12 x    =   3   , y= 25
13 z=27
15 To use calcrc, delete from here up to /* END
16 #!/usr/bin/env calcgo
17 z=x + y
18 y++
20 /* END
22 #!/usr/bin/env calcrc
23 z=`{expr $x + $y}
24 y=`{expr $y + 1}
26 #*/