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