
Text::Roman - Converts roman algarism in integer numbers and the contrary, recognize algarisms.

use Text::Roman;
print roman(123);

Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.
Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like 'Xv', 'XiiI', as legal roman algarism numbers.
Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.

Roman number has origin in following BNF-like formula:
a = I{1,3}
b = V\a?|IV|\a
e = X{1,3}\b?|X{0,3}IX|\b
ee = IX|\b
f = L\e?|XL\ee?|\e
g = C{1,3}\f?|C{0,3}XC\ee?|\f
gg = XC\ee?|\f
h = D\g?|CD\gg?|\g
j = M{1,3}\h?|M{0,3}CM\gg?|\h

Especification supplied by redactor's manual of newspaper "O Estado de São Paulo". URL: http://www.estado.com.br/redac/norn-nro.html

use Text::Roman;
$roman = "XXXV";
$mroman = 'L_X_XXIII';
print roman(123), "\n";
print roman2int($roman), "\n" if isroman($roman);
print mroman2int($mroman), "\n" if ismroman($mroman);

No one known.

Peter de Padua Krauss, krauss@ifqsc.sc.usp.br.

1.2-krauss/set/97; 1.0-krauss/3/ago/97