Roman Numbers : attention James Cook

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu