JCalc V0.1 release notes ======================== For more detailed JCalc documentation, see the file `overview.html', and the javadoc documentation in the `doc' directory in the JAR archive. Warning ======= This software represents work in progress. I have uploaded it to my Web site because a number of people have asked if I have a Java version of my C++ program `kcalc'; this is it. There is a lot that doesn't quite work in this preliminary verions: use at your own risk. JCalc is a surprisingly complex program, and has over a hundred Java classes. Please don't send bug reports, as I already have a bug list several pages long. Do, however, feel free to send bug fixes! What is this? ============= JCalc is an attempt to implement a fast, extensible scientific calculator/expression evaluator in Java. It is intended to be included in other Java programs, but a simple command-line client is included as part of the package. JCalc is fully programmable, and supports compilation. It is intended that only the core mathematical functions are implemented internally, and that most of the functionality is supplied by compiled JCalc scripts. To this end, JCalc reads the file `boot/boot.jc' on start-up. This is expected to load further scripts, to implement the functions required. At present only basic logarithmic and trigonometric functions are defined, but adding new functions is not difficult (see the file boot/trig.jct for examples). Installation ============ 1. Copy the file `jcalc.jar' to a convenient place (e.g., /usr/lib). 2. Modify the script `jcalc' to be appropriate for your systems, and copy it to somewhere in the PATH. Building ======== You should not need to do this unless you want to modify the core functionality. In particular, you will not need to do this to add new variables, constants or functions to the program. To build the classes from scratch you will need up-to-date versions of jjtree and javacc, available from java.sun.com. This distribution contains a shell script called `build' which builds the complete system into a single JAR called `jcalc.jar'. With this JAR on the CLASSPATH, you can run the command-line client like this: java com.web_tomorrow.jcalc.CmdLine [options] You will almost certainly have to customise the build script for your system. The steps in building the JAR are as follows: 1. Generate parse-tree node by running jjtree on jcalc.jjt 2. Generate the parser by running javacc on jcalc.jj 3. Compile all the generated Java classes, and the supporting classes 4. Run the newly-generated jcalc on the script `bootcompile.jct', which compiles the boot scripts. Feel free to add to and modify these scripts to implement additional functions. Look at, for example, `boot/trig.jct' for the syntax of the `define' function 5. Package the classes and the compiled boot scripts into the JAR. Note that extending the function library requires only steps 4 and 5. On-line help ============ JCalc supports on-line help; the function help ("function") gives information about the function; the function apropos("text") prints a summary of functions and variables that have that text in their description fields. Disclaimer ========== This software is work-in-progress. The version you have downloaded may not work. No warranty is implied. Legal ===== (c)2000-2001 Kevin Boone See COPYING.txt for licensing information.