/usr/share/tcltk/iwidgets4.0.1/scripts/roman.itcl is in iwidgets4 4.0.1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | namespace eval ::iwidgets {
variable romand
set romand(val) {1000 900 500 400 100 90 50 40 10 9 5 4 1}
set romand(upper) { M CM D CD C XC L XL X IX V IV I}
set romand(lower) { m cm d cd c xc l xl x ix v iv i}
proc roman2 {n {case upper}} {
variable romand
set r ""
foreach val $romand(val) sym $romand($case) {
while {$n >= $val} {
set r "$r$sym"
incr n -$val
}
}
return $r
}
proc roman {n {case upper}} {
variable romand
set r ""
foreach val $romand(val) sym $romand($case) {
for {} {$n >= $val} {incr n -$val} {
set r "$r$sym"
}
}
return $r
}
}
|