CalcIt is a multi-purpose tool and can be useful to a diverse group of computer users. In its simplest use can be considered as an advanced calculator. This kind of simple use will describe here.
The easiest way of using CalcIt is the Scratchpad. The Scratchpad is accessed by clicking "Scratchpad" item in the list of the Applications page in main CalcIt screen. The Scratchpad appears at the right of the same screen. Its use is very simple. We write code of any complexity in one of the bottom ten editors and immediately execute this code. The result goes to the top window.
Select one of the bottom editors and write a numeric computation.
e.g. 1000+(12+56)*12
Press button in Scratchpad's toolbar or F10 to execute the code. At the top window will appear the result after the symbol of equality:
=1816
Pressing one more time F10 we execute again the code. Will see the following:
=1816
=1816
The result of the new execution is added to after the result of the previous. If we want to clear the result window, from whatever it contains before a new execution, we can use the command Clear. Lets rewrite the code as:
Clear;
1000+(12+56)*12
Now every time we execute the code, the top screen is first cleared.
If the code is a bit more complex we can use variables to store intermediate results. Defining variables is very simple. Simply we assign a value to a name (identifier) the user selects following some simple rules. For example to define the variable MyVar we write the following code:
MyVar:=500;
The operator :=
is used to assign a
value to a variable and also to create it. Lets write again the code:
Clear;
MyVar:=500*3;
1000+(12+56)*12+MyVar;
Do not forget the semicolon (;)
symbol after every line.
If we want to output more than one value then we can use the PRINT command:
Clear;
MyVar:=500*3;
print(1000+(12+56)*12+MyVar);
print(MyVar);
The output after the execution of this code at the top window will be:
3316
1500
Run the program. Activate the Calculating page of the Main CalcIt screen.
1. |
At the left window there is a TREE list box. The root item "Expressions" heads a list where we can store code. Will create a new item there that converts Feet/Inches to centimeters. Press to create a new Expression item. A special form will appear. Under "Calculation of" give any name not already used by other Expression, say FeetToCm. Under "With Expression" enter the following code: This "describes" the way to do such a conversion. To make the conversion normally we have to substitute the variables feet and inch with some values and proceed with the calculation. But this is not to be done here. Writing this expression CalcIt already knows that it has, at some other point, to ask the user to enter the values of variables feet and inch. How CalcIt knows that? Because when a symbol is used and its value is not already known to CalcIt, is considered as a symbol where the user, later, has to enter its value. If Calcit doesn't know the value of a symbol, user must supply it! You can press the button . This checks the syntax of the expression and if all are OK stores the expression to the list. Now drag the expression as it is appeared in the list and drop it in the list (Calculation list) at the right window. A data entry window appears. At this stage just press the button to accept the creation of the new Calculation. What the Calculation is? It is the real thing. The new Calculation is added in the Calculation list and there we can, at last, calculate
Double click the newly created Calculation item at the list. The calculation data entry
form will appear. This window has the most important purpose: To permit you enter the values for the
feet and inch and execute the Calculation. Put some values to
the fields with prompts feet and inch and press the button
at the top (or F10). You will get the result. Where? But it is obvious! Now you can change the values and do more calculations. It is very easy. |
2. |
I have always a number of standard expressions in my expressions list. Some of these are already there for you. See them at the list.
|