Roman Numerals

Last updated at 1:19 pm UTC on 16 January 2006

This page contains information about Roman Numerals and their implementation and use in Squeak.

Possible uses:

- Clocks and watches: used in WatchMorph (but decimal numbers are used by default)!
- Enumerations in tables, Swiki pages, spreadsheets etc.
- Another use is within programming languages, a roman numeral is conceptually a number but is considered by all (?) programming languages to be an identifier. This is sometimes useful.

A ChangeSet implementing the encoding process was sent to the Squeak mailing list on 20 May 2000 for Squeak 2.8a by Andreas Kuckartz. Within 24 hours Stefan Matthias Aust refactored this contribution mercilessly and added the inverse method (the following task therefore is already obsolete:-). See Integer>>romanString and String>>romanNumber. The methods are part of the normal Squeak image since some time.

Here is another task:

"Devise an algorithm to decode roman numerals. (Hardly anybody gets it, but when somebody does, I say O.K., this person knows how to program.)" –David Tenera, director of technology, Tenera Corp.

("Managers Interview Questions and the Reasoning Behind Them" http://www.sdmagazine.com/mgrquest.htm)

Everyone "knows" that you should write a decimal to Roman number converter using a table. What happens if you try it test-first?

[Using C++]

http://www.differentpla.net/~roger/devel/xp/test_first/

ROMAN NUMERALS AND DATES

http://www.deadline.demon.co.uk/roman/front.htm

ROMAN NUMERAL AND DATE CONVERSION WITH ROMAN CALCULATOR & ROMAN NUMERALS TEST

[The JavaScript code in this page was the basis for

the implementation in Smalltalk]

http://www.guernsey.net/~sgibbs/roman.html

Roman Numerals

http://www.mcn.net/~jimloy/roman0.html

1-Numeration.ppt