Abacus Legal syntax


Basic cell definitions

Text that appears in italics is supposed to mean what you should enter in a cell.
A cell in Abacus can be of three types, and therefor there are three main rules you have to be aware of when you're defining a cell in Abacus:
You can reference to the value of another cell simple by typing in the cell coordinates that it has. For example, A3 is a legal reference to the cell which has the x coordinate A and the y coordinate 3. Let's say that you want to define the value of cell A1 to equal the value of cell A3. You can not just write A3 in cell A1. Why not? It's simple! Consider the rules above, and you'll clearly see that A3 falls into the second category of cell definitions. A text string will never be evaluated, in fact, should you ever try to evaluate a textstring (by referencing it from another cell) it will evaluate to zero. Back on track now, to fix the problem with referencing to cell A3 you have to write (in cell A1) =A3.
In the same way, should you want to comment out a cell (containing a value or an equation), just put a " or a ' in front of it. The following will evaluate to 0 (if you don't see why, reread this page) '=A3*100-2. That makes sense, doesn't it?

The spreadsheets power: Equations

As you can guess from the topic, a spreadsheet is pretty useless without equations. So, what is an equation then? You've already seen one equation, namely '=A1*100-2. One important point when working with a spreadsheet is that when you're dealing with equations or numbers in cells, the visible part of the cell is what they equals/evaluates to, and not what their definition is. Let's imagine that the cell A1 contains the number 2. Then the equation above will equal 198, and in the same cell that '=A1*100-2 is defined it will show 198 on the screen. If you were to change the value of A1, then the value of the referencing equation is changed immediately.
There are a few rules you must obey when you're working with equations:

The working horses in a spreadsheet: Functions

A function generates an answer based on the inputs. This might not mean anything to you, but it helps me justify that we should cover one more form of cell referencing, namely blocks (or ranges). A block is defined like A1:B4 and covers all cells within that interval, such as A3 and B1.
Blocks are very useful, since they releive you of some very tedious tasks. Say, for example, that you want to calculate the sum of all elements in the block A1:B4, without the block concept you'd have to write =sum(A1,A2,A3,A4,B1,B2,B3,B4) which, as you can see, really sucks. To remedy this, you can write =sum(A1:B4) instead.
Functions can have these forms:

Useful things: Constants

There's a number of predefined constants in Abacus. A constant is a value that you cannot change, but you might use it often, so that it's utterly boring to type it in everytime. One such constant is pi. It holds the value 3.141256... and can be used like this: =A3*(pi/180).

Last updated on 14:th july by Bjorn Tornqvist