icon - Pitacalc

Pitacalc - The command-line interface calculator

Pitacalc is a command line interface calculator program. It's works like a regular calculator by performing arithmetic operations and having an accumulator that keeps the running total. It also has several registers that can be used to temporarily store values.

For those who are interested, the calculator is a Win32 console application, so it should run on Windows 95 and higher. Maybe even NT 4; not that I've tried.

Pitacalc Image 1Arithmetic operations are performed by typing in instructions. For example, to set the accumulator to 100, one would type in set 100. To add 200 to that value, one would type in add 200. The result of 300 shows up on the line following the add 200 line.

Although the example only shows adding one value to the accumulator, it is possible to add more than one value at a time to the accumulator. For example, by typing sub 100 200, the result of 0 will be returned.

Basically I was writing this calculator as practice programming in C. After programming in Java fairly exclusively for the past year or so, I thought it was time to brush up on some good ol' C. Having to juggle around pointers between functions and calling malloc at every corner was loads of fun. (Please note the sarcasm in the previous sentence.)

Just to add useless features, the program accepts "scripts" of instructions to execute. Conversely, the output of the program can be dumped into an external file. I can't think of any real use for this feature. Pitacalc has many features that really don't have any real purpose.

Over the next few posts, I will introduce the great features (yes, that's an overstatement) of Pitacalc. The current version 0.0.1 build 257. I'll be adding more features (yes!) so the current version in the future will probably not be build 257.

Next (Pitacalc Part 2) >
Back to Pitacalc index