The new user interface of rcalc introduced in version 0.5.0 gives you access to some interesting possibilities to organize your calculus. Each valid expression you type is added to a list, where each row depends on all the previous ones.
When you type a valid expression (Section 4) at the rcalc prompt, you modify your session by adding (or replacing) a row.
A typical session looks like this:
The first and third rows represent a function definition (f and g). The second row is a variable definition (a), and the fourth row is an evaluation (that is, you just ask for a result without storing it in a variable).
See Section 4 to learn how to add variables or functions.
In the session table, the first column shows the state of the line. It can be active or inactive. The session state results of the evaluation of all active lines, beginning with the first one, and descending to the last one.
Since the lines are evaluated from the first one to the last one, the order has a consequence on all the lines below.
Once you have clicked on a row, you can move it up, down, (in)activate or remove it using the line toolbar.
Thebutton is used to define where the next expression will be inserted: at end, before or after the selected line, or replace the selected line.
Line operations are explained in Section 5.
If a line is active, it will be evaluated, thus it will influence all the lines below it. If it is inactive, it will just be ignored.
For example, let us inactivate the second line:
Regarding to the third and fourth lines, the variable 'a' no longer exists. Since they both depend on it, their value is now 'undefined'.
You can also replace the row to modify the value of 'a':
Notice how the values of all the lines below change.
Now, what if instead of replacing the line, we define 'a' twice ? Since the order is important, the first definition will be used until the second one is reached.
...and if we inactivate the second one, the first one is used:
You can define multiple functions as well.