Calculations

Czimps can handle many types of numeric calculation.

The simplist method is to add a Variable and initialize it with some simple maths. Highlight the Variables line on the Collections Window, or an existing Variable, then press the Add button to get the dialog above. Enter a name for a new Variable, and a numeric calculation. When you press OK you will return to the Collections Window and you will see a new Variable in the Variables Collection which will look something like x=6.

In Czimps you can use the following basic maths operations Add '+', Minus '-', Times '*', Devided By '/' and To The Power Of '^', you can also use brackets in the usual way e.g. 2*(3+4) is 14, add 3 and 4 first then multiply by 2. For a more extensive list of operators and maths functions press the Ins., insert, button when filling out a Dialog, choosing an item from this menu will insert the corresponding text.

Once you have created a Variable you can Highlight it and press the Edit button to change its value. The Del. button allows you to delete it and Renm to rename it. The Move button is used to move items in the Collections Window, click it first to choose the item to movee then again to place it after or inside the selected item, provided this makes sense.

The above procedures have one drawback, you loose your initial input. There are a number of ways around this problem but the simplist is to use a SetVar Function. When you use a Czimps Function you split the calculation into two stages, first you create a Function in the Functions Collection which states what you want to do, and second you use the Run button to Run the Function and get the result. This has the advantage that you can adjust the Functions Properties as many times as you like and rerun it.

To add this Function to the Functions Collection, or after an existing Function, or in a Function List Highlight one of these then press the Menu button, the menu shown has a few single items and quite a few Submenus with names that begin with a letter, the V menu lists functions that affect Variables, from it choose SetVar.

Most Functions, and many other items, have Properties that you can inspect or alter by pressing the Props button, this will open a Properties Dialog. You will notice on the top line of many Dialogs there is an area where you can type, this is not used directly for Properties entry but is part of the Czimps Copy and Paste system, and may be used for other purposes too. The Copy button Copies the current line into this area, and the Past=Paste button Pastes its contents where the cursor is in a field below. The Exp., Expand or Expression button performs the operations indicated by the text in this area then inserts the result at the cursor position.

In the Dialogs above you can use Variables which have already been defined in the expression that sets the value of a Variable e.g. if x=5 then y=x+1 would set y to 6.

BACK