Names in calculations (variables)

7 views
Skip to first unread message

Peter Stuifzand

unread,
Mar 9, 2012, 7:26:33 AM3/9/12
to abacu...@googlegroups.com
Hi all,

I have been working on Abacus again for a bit. And after some work, now we can use variables. With this you can refer to another part of the calculation on the sheet.

The code can be found at GitHub at the moment. So if you like to test it out, clone the repository and open the project in MonoDevelop and see if you can build it, run it and use it.


I will give two examples below.

Example 1 (circle radius => circumference)

radius = 1
circumference = 2*PI*radius

Changing the `radius` will change the `circumference` calculation.


Example 2

p1 = 30
p2 = 40
total=p1+p2
shouldpay = total/2
p1shouldpay=shouldpay-p1
p2shouldpay=shouldpay-p2

p1 and p2 are people who both payed some money, one of them payed more, who should pay the other back. Of course this example can be improved, but we need some more features.

One of the things that I would really like here is a way to create a way to have reusable calculations.


--
Peter Stuifzand
http://peterstuifzand.nl/

Reply all
Reply to author
Forward
0 new messages