Roman numeral to decimal converter
You have optimized this very well. However, using a different algorithm can reduce code size from 665 bytes to 411 bytes:

DelVar IDelVar VDelVar XDelVar LDelVar CDelVar DDelVar M"?-&gt;Str2
"IVXLCDM-&gt;Str3
ClrHome
Input Str1
expr(Str1-&gt;N
If N
Then
For(I,0,log(N
10fPart(.1N-&gt;A
While A
sum({4.1,4.1,9.2}(A={4,5,9-&gt;B
sub(Str3,2I+10fPart(B)+1,1)+Str2-&gt;Str2
abs(A-1-int(B-&gt;A
End
int(.1N-&gt;N
End
sub(Str2,1,length(Str2)-1
Else
Str2+Str1+"?-&gt;Str1
For(I,0,5
inString(Str1,sub("IVIXXLXCCDCM",2I+1,2
If Ans
Then
sub(Str1,1,Ans-1)+sub(Str1,Ans+2,length(Str1)-Ans-1-&gt;Str1
C+(4+10fPart(I/2))10^(iPart(I/2-&gt;C
End
End
For(I,1,length(Str1
inString(Str3,sub(Str1,I,1
If Ans
C+(5-8fPart(.5Ans))10^(iPart(.5Ans-.5-&gt;C
End
C
End
Ans