1. Roman Numbers : attention James Cook
- Posted by Senator Jun 24, 2017
- 1144 views
- Last edited Jun 25, 2017
Thanks for your recent contribution, Roman Numbers
A program already exists in the archive from 2005, numeric conversions by David Money which converts Roman Numerals to integers and vice versa.
Your routine for converting Roman numerals to integers appears to be more concise than Money's. Perhaps you could adapt Money's routine to convert Roman Numerals to integers to your more concise programming method/style.
Money's routine naming conventions appear more intuitive and less cumbersome than yours. For example:
-- James Cook ? number_roman_to_modern("XXIV") -- 24 ? number_modern_to_roman(24) --"XXIV" -- David Money ? roman_to_int("XXIV") -- 24 ? integer_to_roman(24,1) -- "XXIV" -- 1 could easily be made the default ? integer_to_roman(24,0) -- "xxiv" ----------------------------------------------------
Regards, Ken Rhodes