Darwin Help

Back to Index

Roman

Function Roman - convert an integer to a roman numeral

Calling Sequence  Roman(n)
Parameters
NameTypeDescription

n posint 
Return Type  string
Synopsis Roman converts a positive integer into an uppercase roman numeral. The conversion cannot be done for n<=0. For very large numbers, the output string becomes linear in n/1000.
Examples
> Roman(73);
LXXIII
> Roman(1948);
MCMXLVIII
> lowercase(Roman(14));
xiv
See also Code,   Color,   Copyright,   Document,   HTML,   HyperLink,   Indent,   LastUpdatedBy,   latex,   List,   Paragraph,   PostscriptFigure,   print,   RunDarwinSession,   screenwidth,   Table,   TT,   View