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.
- 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?
ROMAN NUMERALS AND DATES
ROMAN NUMERAL AND DATE CONVERSION WITH ROMAN CALCULATOR & ROMAN NUMERALS TEST
the implementation in Smalltalk]
Page created by Andreas Kuckartz