function roman(n as integer)
decimal$=STR$(n)
decimal$=RIGHT$(decimal$,4)
numeral$=""
numeral$=numeral$+roman1(VAL(MID$(decimal$,1)))
numeral$=numeral$+roman2(VAL(MID$(decimal$,2)))
numeral$=numeral$+roman3(VAL(MID$(decimal$,3)))
numeral$=numeral$+roman4(VAL(MID$(decimal$,4)))
endfunction numeral$
function roman1(n as integer)
a$="M"
m$=""
If n=>1
For x = 1 to n
m$=m$+a$
Next x
endif
endfunction m$
function roman2(n as integer)
c$=""
If n=1 then c$="C"
If n=2 then c$="CC"
If n=3 then c$="CCC"
If n=4 then c$="CD"
If n=5 then c$="D"
If n=6 then c$="DC"
IF n=7 then c$="DCC"
If n=8 then c$="DCCC"
If n=9 then c$="CM"
endfunction c$
function roman3(n as integer)
c$=""
If n=1 then c$="X"
If n=2 then c$="XX"
If n=3 then c$="XXX"
If n=4 then c$="XL"
If n=5 then c$="L"
If n=6 then c$="LX"
IF n=7 then c$="LXX"
If n=8 then c$="LXXX"
If n=9 then c$="XC"
endfunction c$
function roman4(n as integer)
c$=""
If n=1 then c$="I"
If n=2 then c$="II"
If n=3 then c$="III"
If n=4 then c$="IV"
If n=5 then c$="V"
If n=6 then c$="VI"
IF n=7 then c$="VII"
If n=8 then c$="VIII"
If n=9 then c$="IX"
endfunction c$
The optomist's right, The pessimist's right.