REVO2700 Roman NumeralsX}on closeStack if the freeSize of this stack > 0 and the shiftKey is not down then doMenu Compact Stack end if end closeStackU  U helvetica Ucourier Ucourier cREVOnline fingerprint_w5vQ-pJpRRD4_vJonsy-w  @       Table)h c  1,I 5,V 10,X 50,L 100,C 500,D 1000,M 5000,V   10000,X   50000,L    100000,C    500000,D   1000000,M  Decimal)x Don returnInField send mouseUp to card btn "Roman" end returnInField(J  666  Roman)x Fon returnInField send mouseUp to card btn "Decimal" end returnInFieldiFu  DCLXVI    Roman@Eyon mouseUp set cursor to watch put card fld "Decimal" into d put empty into card fld "Roman" put number of lines of card fld "Table" into i put 0 into n repeat while d>0 if d>=item 1 of line i of card fld "Table" then put n+1 into n put d-(item 1 of line i of card fld "Table") into d if n>3 then put number of chars of card fld "Roman" into m if m>3 then put dvalue(m-3)/dvalue(m) into f else put 0 into f if f<>5 then delete char m-2 to m of card fld "Roman" put item 2 of line i of card fld "Table" after card fld "Roman" setStyle i put item 2 of line i+1 of card fld "Table" after card fld "Roman" setStyle i+1 else delete char m-3 to m of card fld "Roman" put item 2 of line i of card fld "Table" after card fld "Roman" setStyle i put item 2 of line i+2 of card fld "Table" after card fld "Roman" setStyle i+2 end if else put item 2 of line i of card fld "Table" after card fld "Roman" setStyle i end if next repeat else put i-1 into i put 0 into n end if end repeat end mouseUp on setStyle i if item 1 of line i of card fld "Table" > 1000 then set the textStyle of last char of card fld "Roman" to underline else set the textStyle of last char of card fld "Roman" to plain end if end setStyle function dvalue cn put char cn of card field "Roman" into c if the textStyle of char cn of card fld "Roman" is underline then put true into big else put false into big end if repeat with i=1 to number of lines of card fld "Table" if c=(item 2 of line i of card fld "Table") then if big and item 1 of line i of card fld "Table"<5000 then next repeat return item 1 of line i of card fld "Table" end if end repeat answer "Bad Character in Roman Numeral=" & c return 0 end dvalue5 cREVGeneral  Decimal@EyPon mouseUp set cursor to watch put card fld "Roman" into r put empty into card fld "Decimal" put number of lines of card fld "Table" into n put space into c put 0 into d put 0 into pd repeat with j=1 to number of chars of r put c into pc put char j of r into c if the textStyle of char j of card fld "Roman" is underline then put true into big else put false into big end if repeat with i=1 to n if c=item 2 of line i of card fld "Table" then put item 1 of line i of card fld "Table" into bs if big and bs<5000 then next repeat if bs>pd then put d+(bs-2*pd) into d else put d+bs into d end if put d into card field "Decimal" put bs into pd exit repeat end if end repeat end repeat end mouseUp Y; cREVGeneral  i revOnline | RunRev