Calculator Romanus.

	

This is my implementation of the Roman calculator. It's probably not the most useful program you can find on the web, but I had a nice time writing it. The calculator is designed as a standard command line utility program. To use it, just call the program with the appropriate switch and arguments. There are four switches for calculations , one for conversions and one for help ( in Latin). The switches are : -a = add, -s = subtract, -m = multiplicate, -d = divide, -c = convert, -? = help.

Example: If you want to add 100 and 5, type "romecalc -a C V". You could also type "romecalc -a C 5" or "romecalc -a 100 5", as the program understands both Roman and conventional numbers. The answer will always be in Roman numerals, except when you use the conversion option. To make a conversion, type "romecalc -c " and enter the number (Roman or conventional) that you want to convert, and the calculator will carry out the appropriate conversion.

Installation

The installation procedure is depending on the system that you use. If you´re using Windows 95 or 98 (and the same should go for Windows ME as far as I understand), the best choice is to unzip the program to C: \ (or whatever your system disk is). That means that Romecalc is installed to your root directory, and can be called from the DOS emulator (command.exe) by writing "romecalc -[options]" at the prompt. If you're using Windows 2000 or XP, you should unzip Romecalc to "MyDocuments\Your name", and that should make the utility available from the command prompt in the same way.

Offending Inputs and Error Messages


An offending input error occurs when you try to make an input that the program can't handle. This will generate an error message. As this program is a Roman calculator, all error messages are in Latin, so I have made the following explanations available as a service to users with limited knowledge of that language.

If you call the calculator with no switch and no arguments, it will return the message Benevole operator, sine argumentiis calculare non possum! Vide explanationem (-?) ! The same message will appear if you enter a switch with no arguments (except for the -? switch). With this message the calculator tells the "benevolent user " that it can't make any calculation if no arguments are present, and asks him or her to take a look at the instructions (Vide explanationem!).

If you enter arguments with no switch or a non-existing switch specified , the program will terminate with the message Abeant hae ineptiae! This means May these follies go away!

The calculator supports the classical Roman set of numbers, i.e. I, V, X, L, C, D and M. There is no support for post-classical and mediaeval additions like "P". For practical reasons, I have limited the size of numbers that the calculator can handle to MMMMMMMMMIM (9999). If you enter a greater number, the calculator will tell you that Numerus ne sit maior quam MMMMMMMMMIM!, i.e. The number may not be greater than 9999!. If the result of a calculation exceeds that size, the calculator will inform you about this by returning Responsum maius quam MMMMMMMMMIM est! ( The answer is greater than 9999!). Likewise, if the result is zero or less, Nihil (Nothing) is returned.

The calculator is compiled for DOS/Windows on the djgpp-compiler. If you want to use it on a different system, download the source code and compile it for that system (it will work without problems on most C/C++ compilers). As this program is 100% freeware, please feel free to use the code for any purpose that you find suitable!

Download compiled version

Download source code.

Main Page