
eCalc 2.0 preview 2


eCalc 2.0 is an easy to use, but powerfull calculator for OS/2 and eComStation. 
Its based on the eCalc 1.x application, developed by Nick Morrow. eCalc 1.x was part of eComStation 1.x. Now eCalc is available for OS/2 as well as for eCs.


It requires REXX and PM.


New in version eCalc 2.0


In short:

* optional: always on top
* optional: hide keyboard
* entry field and separate result field (realtime calculations during input)
* autoclip - automatic copy of result to clipboard
* expressions (Rexx enabled, extensible with external programs)
* changeable look and feel via WPS palettes
* order of operations just like in scientific calculators
* user definable output digits
* user definable decimal delimiter
* support of 'Rexx Math Function Package' by Patrick J. Mueller (scientific functions)
* Drag an drop


Installation

Just unzip the archive to a directory on harddrive. Run install.cmd from a commandline to create objects on your desktop.



eCalc 2.0 Description:

* 'Always On Top'
Enable this to make the eAclac window floating on top over all othe windows
Limitation: works not with DOS and WINOS/2 windows.


* hide keyboard
With this option you are able to enable and disable the virtual keyboard.
This maybe handy in cunjuction with the 'always on top' function, to keep a small calculation window always on the desktop.


* realtime calculations
You haven't to hit "=" or the enter key, the result will be displayed immediataly after entering an valid expression.


* auto clip
This function will copy the result of calculations immediataly to the clipboard

* order of operations just like in scientific calculators
1. Brackets
2. Exponents
3. Division
4. Multiplication
5. Addition
6. Subtraction 

(mnemonic "BEDMAS")

For further information see
http://en.wikipedia.org/wiki/Order_of_operations


* entry field and result field
Both, calculations way and result ar always visable. Its easy to change several numbers, operators or expressions without to re-enter long calculation chains again.


* expressions
The interpreted result field makes it possible to use own external routines or rexx commands. 

Here are some examples:
1. Using standard Rexx commands
1.1. Enter c2x(7) to the entry field, the result will be the hexadecimal value of 7, because c2x is a Rexx command, which will be interpreted.
1.2 Enter "5**2", and you will get the power of 5 (you can use other exponents). 

Note: Exponents must be integer, its not possible to calculate the square root via x**0.5 (currently you have to use an external function to calculate roots).


2. Using external routines

2.1 use OS/2 2.0 Rexx Math Function Package by Patrick J. Mueller
eCalc supports this DLL, which contains functions for scrientific operations.
Download this DLL from Hobbes, it is not included in eCalc.

This package cmomes with the following functions:
* cosine, sine, tangent, arc cosine, arc sine, arc tangent
  hyperbolic cosine, hyperbolic sine, hyperbolic tangent
* smallest integer >= x, largest  integer <= x
* e to the power x (e is natural logarithm base)
* natural logarithm
* base 10 logarithm
* square root 
* pi
* e

Note the funtion power (pow) from the package is not supported. Use the standard Rexx operation 'x**y' to get the power y of x instead. 

2.2 using own Rexx scripts
Enter P() into the entry field, the result will be 3.14.
P.cmd is an external rexx routine, the return code of this routine is '3.14'.

BTW, if you are looking for Pi with more digits, take a look at 
http://3.141592653589793238462643383279502884197169399375105820974944592.com/

;-)

You may use it for other, more complex functions.
Be carefull with it, don't enter OS/2 commands! Its possible, that you enter an own command, which is used internally in eCalc as a variable or procedure. eCalc is using the prefix "_eCalc" for all internal procedurs and variables, please do not use this string in your expressions.

* changeable look and feel
The main window is sizable, you can set it up like you want. E.g. you may disable the keyboard and make it very width to see long calculations without scrolling.
And you can change the fore- and background color as well as the fonts of all controls of the eCalc main window. Open Options > Settings and drop colors and fonts from OS/2 odr eCs standard palettes to the sample controls, and then apply your settings. The settings will be saved. 
Note: Don't drag fonts and colors to the eCalc main window directly! This works during runtime, but will not be saved.

* user definable output digits
Select the number of decimal digits after the decimal delimiter. Select 'disable' to use most possible digits. 
Use 'system default' setting to use the value of your local operating system setting.


* user definable decimal delimiter
Select comma, dor or 'system default' as delimiter (last one to use the value of your local operating system setting)


* Drag and drop
After dropping a file to the entry field, the first line of the file will be inserted.
If the WPS enhancer 'DragText' is installed, it is possible to drag and drop text from the entry or result field to other applications or folders.
You may find DragText here:
http://e-vertise.com/dragtext/



COPYRIGHT & LICENSE

We allow you to use and distribute this files freely under the condition that we are in no way responsible for any damage or loss you may suffer. Use this software at your own 
risk!

eCalc 2.0 is protected by the GNU GENERAL PUBLIC LICENSE
For license informations see:
http://www.gnu.org/licenses/gpl.txt

The source code and new versions will be available at http://www.subsys.de/ecalc/

eCALC 2.0 makes use of the following module:

OS2apirx - OS/2 API for Rexx
Version 03. Apr 2003
(c) Carsten Arnold
http://www.ca-arnold.de

Rexx Math Function Package
For License information see ..\RxMath\license.txt
(you will find the documentation for this dll there, too.)





Known Bugs / Todo / Notes for developers:


Entry field:
The entry field is a multi-line entry field. This should *not* be changed, because it is neccessary for 'insert at cursor position' operations.


Keys:
Currently, the program ingnores the value of the numlock setting. In both settings, numbers will be inserted into the entry field, when the user hits a key on num block. I think this is a feature for many users, but this behaviour should be optional, because it violates system standards.


Internationalizing:
All strings should be out-sourced, to be translatable.


Documentation
INF files in national lanuages are not available. Would be nice to have...


Font & Colors
Currently the reset buttons are without a fuction. The button should reset the fore- and background color and the font to default values.


Missing features:
- internal numeric digits should be customizable.
- external list for constants like Pi, eventually with GUI for constant management.




History

new  in v2 preview 2
- support of 'Rexx Math Function Package' by Patrick J. Mueller (scientific functions)
- ESC and NUM now deletes entry and result field
- F3 closes the program
- new eCalc folder icons
- bugfix: its not longer possible to paste mult-line text from the clipboard to the entry field using CTRL+V or SHIFT+INS. Only the first line of the clipboard content will be inserted.
Unfortunately its still possible to insert such text with the mouse (mouse button 1 + 2 if enabled), and I have no idea how to prevent it. Please avoid it for yourself at this time.

new in v2 preview 1
- first public release of version 2.x


Frank Wochatz
Berlin, July 2005