Handbook
Glossary
roman> ( str -- n )
Roman numerals
Prev:
>ROMAN ( n -- str )
Next:
roman+ ( x y -- z )
Vocabulary
roman
Inputs
str
a
string
Outputs
n
an
integer
Word description
Converts a Roman numeral to an integer.
Notes
The range for this word is i-mmmcmxcix, inclusive.
Examples
USING: prettyprint roman ; "lvi" roman> .
56
See also
>roman
,
>ROMAN
Definition
USING:
roman.private
sequences
splitting.monotonic
unicode
;
IN:
roman
:
roman>
( str -- n )
>lower
[
roman-digit>=
]
monotonic-split
[
roman-value
]
map-sum
;