PCalc for Java - Programming calculator. You can write programs for stack machine (with simplified Java like instruction set). Program consists of one or more procedure which can be nested. It is possible to access variables of top procedure (like in Pascal). You can execute program ste-by-step and inspect stack and variables in debugger. Input of commands and thier operands is optimized for mobile phone. This calculator is using floating point arithmetic with quadra precision (64 bits for both mantissa and exponent) implemented by Nikolay Klimchuk.
· PCalc keeps in database all your programs. A program consists of main procedure and may be some subprocedures. Program may have input parameters. The values of these parameters will be asked when program is started. Access to the parameters is performed using input instruction.
· PCalc provides stack-based language (like Forth). Operands are pushed on stack and operations are performed with top elements of the stack. Temporary results also can be stores in local variables (of self or outer procedure). Stack is also used to pass parameters to procedures and return values. Content of stack after return from main procedure is treated as program result. It is also possible view values of variables of main procedure (if program should return many results it is more convenient to store them in local variables).
· PCalc provides the following groups of instructions: load/store, operators, functions, control flow. Instructions of first three groups do not require extra explanation. Control flow instructions includes procedure call, return, conditional (IF) and unconditional (GOTO) branches. IF transforms control to the specified label if value on stack is zero. Label for these instruction is specified by selecting instruction in the list. Please notice, that when you are inserting new branch instruction it is not yet present in the list.
· PCalc provides wide editing capabilities. It is possible to add/remove/rename any variable/parameter/function. The only restriction is that it is not possible to remove entity which is used. It is also possible to move label (adjusting all branch instruction referencing this label) or change target of particular branch instruction.
· PCalc allows to introduce new variable only when you are specifying operand for STORE. Operand of load method is selected from the list of available variables. It somehow prevents programmer from using uninitialized variables.
Like it? Share with your friends!
Other Java Freeware of Developer «Konstantin Knizhnik»:
Counter for Java Counter for Java - ten counters on your mobile phone.
You can count everything you want (birds, flowers, your guests ect) and you phone will store all this information and can show it to you as a diagram
MIDP Calculator MIDP Calculator is a Java calculator for mobile devices, which works much like a good old HP calculator with RPN logic
Touchscreen scientific calculator for S6 Scientific Calculator is an easy to use universal scientific calculator app for touchscreen devices. It evaluates basic mathematical as well as nested scientific expressions under consideration of the algebraic convention "brackets before power before point before line calculation"
RZCalculator This calculator for java mobile phones can calculate binary, octal, decimal, hex numbers and convert it to each other. It supports logical expressions, parenthesisses, memory and 64bit integer arrithmetics. Operator precedence as in C++, C#, C, Java
Scientific Calculator 3D Turn your mobile into an advanced scientific calculator, plot any function you want in 2D or 3D and evaluate its critical points