|
This is a simple little RPN calculator written entirely in Tcl/Tk, that is slowly being grown into something useful.
The latest version is 0.19. It fixes a stupid bug in reading floats less than 1.
The previous version was 0.18. It fixed a serious bug in the trigonometry arc functions, which produced erroneous output if you weren't in radian mode. There were more tweaks to font and button sizes, for cross-platform consistency.
The previous version was 0.17. It has incorporated some of Tom Poindexter's changes to the interface, and fixes a bug in displaying floating point numbers as they are being input.
It was written on a Linux system (2.0.36) but has been successfully run under SunOS, Solaris and Windows NT 4.0, using version Tcl/Tk 8.x/8.x.
The idea behind ksc, aside from having a nice RPN calculator, is to make its interface and functionality modular. Functionality beyond the basics is available by opening new windows to display new buttons and labels. When this functionality is no longer needed, the associated window can be closed to restore desktop space/reduce clutter. This is more efficient than using pulldown menus, but less efficient than actually programming Tcl.
|
|
|
As already mentioned, this calculator uses RPN, or reverse polish notation, meaning the arguments are pushed onto a stack before being evaluated. “y” refers to the top of the stack; “x” is the variable currently being input (before being pushed on the stack).
A statistics module and maybe even a graphing module would be nice, but neither are implemented yet. Also, there is no support for change of bases. Other ideas include a user function and variable library with the ability to push user-defined variables and funtions onto the stack, and to save them to a file for persistence between sessions. And of course a graphing window.
See also Tom Poindexter's excellent Mpexpr package, which includes an modified version of ksc, called mpksc, giving it support for multiple precision floating point numbers. Pretty cool.
Last modified Tue, Jul 18, 2000
Copyright © 1999-2000 Ken St-Cyr.
Contact Ken St-Cyr