Main Screen

Overview

Even CalcIt developed originally as an Expressions Calculator now is mostly a Coding/Programming tool. Its purpose is to write, store and organize generally small pieces of codes that can be used to help/support the every day work. Its language is designed to be easy to learn and understand and it is specifically focused in the processing of numeric and alphanumeric data and text files and helps to program fast and with the less possible debugging. Its model of usability is the interactive programming, meaning with that that at any stage of your code development you have a convenient place to print program results and see if it works ok and then continue to the next stage. So in this way your program is tested in small pieces of code progressively.

CalcIt user interface serves in three areas:

  1. Write, modify or expand your code quickly with an easy to learn and understand special language. Switch from one code to another quickly using a hierarchical list which has entries for any piece of the codes you write.
  2. Store your code in one place and organize it. In a hierarchical list you have many options to store your code, as User Defined Function (UDF), Class, Application or just quickly put some code in work at Scratchpad. For every kind of code you can use folders for farther categorization. This helps your ideas to be stored and saved and not lost or forgotten. CalcIt can preserve many pieces of your intellectual property and always keep them active and usable.
  3. Execute your code as easy and fast as possible. Have a convenient place to print your code results at any moment so it is easy to validate its correctness at any stage. That means "interactive programming". With other development tools, to obtain this capability, you have first to build it for every code you write. If it is a big Application that will work on it for months maybe is not a problem but for small application where the need to minimize the development time is important, this, always there, CalcIt capability saves a lot of headache.

CalcIt besides to be a coding tool remains also a Calculator. Its user interface is divided to serve these, some times intercrossing, operations.

CalcIt user interface has a toolbar at the top and below in three TABs where one can code CalcIt applications (Applications), quickly and efficiently to make any calculation  (Calculations) and last to write any code in form of functions or Classes for general use  and so expanding CalcIt's standard command set (Library).

Main Toolbar

Applications Page

In Applications Page you write, store, organize and run your Application codes. There are two parts. At left is a hierarchical list which serves as an index and directory for your codes. You can click at any item in the list and select it. Every selected item appears in the right side where you can enter its code or modify it using a Code Editor.  Above the editor there is an output window where your Code results can be printed.

There are two root entries in the hierarchical list.

Applications

Under "Applications" we create, edit or modify pieces of CalcIt code ("Applications") that can be executed immediately. When an Application is created or selected for modification or execution then at the right appears a toolbar, the Output window and the code editor containing Application's code.

The buttons in the toolbar are:

 

Manage Applications sub tree:

See also CalcIt Language.

Scratchpad

Scratchpad is a place where fast and easily we can write and run a piece of CalcIt code. In many ways Scratchpad works similar to Applications. At the right section appears the same toolbar and below it the Output window. At the bottom we found a set of 10 code editors selected by tabs. We select one of these editors, we write or modify code and run it immediately.

The Scratchpad toolbar works the same as in Applications above for the code of the currently active code editor.

Scratchpad is a convenient place to be used for quick calculations as well.

See also CalcIt Language.

Calculations Page

This is the place to use CalcIt as a Calculator. The use of CalcIt as a Calculator is a bit different than you might expect but offers greater versatility and control than any usual calculator user interface. We have three things to define: Expressions, Problems and Calculations. 

Calculating Page is divided in two parts. At left is a hierarchical list to create, store and maintain Expressions and Problems. At the right appears the list of the Calculation items contained in the currently active Problem.

Expressions

Expressions is a kind of parameterized piece of CalcIt code much like a UDF is. Parameters of Expression items can be only simple variables, that is, cannot be array or automation Objects, Forms, Files or Buffers. Also can be only IN parameters (by value). Expressions can be organized in folders in the tree list.

Managing the Expression List

Problems

Problems represent a group of Collaborating Calculation items that serve the same computation purpose or belong in the same category. Selecting a Problem we activate at the right the list of owned Calculation items.

Managing Problems List

Calculations

Calculations are items that really permit to enter values and execute calculations. They are listed in a flat list at the right of the Calculating Page. A Calculation always belongs to a Problem and to execute a specific Calculation we have to activate the Problem it is contained selecting it in the list.

Every Calculation appears in the Calculations list as a line of three columns as follows:

To execute all Calculations in the list press F10 or at the right-top of the Calculations list Window.

Managing Calculations List

NOTE: At Calculation list we can select more than one items (for example to delete them all) keeping pressed the CONTROL key and right mouse button. One click in an element selects, another deselects and so on.

Library Page

Here code is stored in the Form of User Defined functions or Classes. Is a repository of reusable code to any other CalcIt places where code can be written. Also provides a place to store constant values that can be used everywhere. At the right is a hierarchical tree like in the previous two TABs. There are three root items. Functions, Classes and Constants.

Functions.

Under "Functions" we create, edit or modify User Defined Functions (UDF). UDFs is the simplest way to extend CalcIt's command set with functions written in CalcIt language. When a UDF is created or selected in the list for modifications then at the right appears a code editor.

For every UDF we have to define its name and its parameters interface. At the right, under Edit/Create Functions we add or modify the function's name. Below is a code editor where we write its code. Function's parameter interface can be defined in two ways:

  1. Automatically. Every variable which is used in the code without first assign to it a value with the assignment operator (or used as FOR variable or passed in a IN/OUT function call parameter) becomes part of the parameters list. In this way we cannot define the order of the created parameters which is decided by the order of their appearance in the code. Also all parameters are IN parameters and cannot be Arrays or Automation objects.
  2. Via command extern. Using this command we explicitly define the parameters of UDF. Also we can define IN/OUT parameters and also Array or Automation Object parameters. Note that if some variables are not defined in the extern command and are used in the code before a value is assigned to them with the assignment operator then these variables will be added in the parameters list.

In the editing part of a UDF there are two buttons.

  1. . Enters UDF code in Debugger window so the user is able to enter/remove breakpoints.
  2. . Compiles the code and if the code is syntactically correct, constructs UDF's parameters list.

Every UDF appear in the list with its current parameters list.

Manage Functions sub tree

See also CalcIt Language

Classes

Under "Classes" we create, edit or modify Class definitions. Class definitions are used to create Class variables via the SET command. Classes is another way to extend CalcIt command set with user code but are more powerful and versatile and permit the creation of useful libraries for various purposes in CalcIt. Class definitions are edited the same way as a UDF described above. The only difference is the way they appear in the list. All public functions or properties (defined in the Class) are listed below Class definition name. The user can click in any of them to easily locate their start in the code. The Class definition name appears, in the list, with the parameter list of the constructor.

The sub tree of Classes is managed the same way as in the case of Functions above.

See also CalcIt Language and Using Classes and Class Variables.

Constants

Selecting the Constants item in the tree list we activate at the right a code editor where we add all of our global constants. Global constants are created or edited using a very simple syntax. This syntax does two things:

  1. Defines the constants and their values.
  2. Organize the constants in folders.

See an example:

Folder 'Calendar'
 Months='January|February|March|April|May|June|July|August|September|October|November|Desember';
 Days='Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday';
end;

Folder 'Financial'
 Tax=18;
 Interest=5;
 Profit=10;
end;

Using command "Folder" we can create a folder with a name specified at the right (in single quotes). With command "end" we close a folder. Inside a folder other folders can be created in any needed nesting level.

Constants will appear in the list in the same way they are entered in the code editor with folders and sub folders.

We can locate a constant or a folder easily by clicking its name at the tree list.