Is this a good idea?
Yes. This can be helpful.
 50%  [ 1 ]
No, nobody cares.
 50%  [ 1 ]
Total Votes : 2

I am planning for future programs to work on OS 2.43 instead of 2.53MP+. I am trying to make. a program to check whether programs have commands in OS 2.53MP+, but this doesn't work.

Code:

:"OS 2.43 Validator
ClrHome
If det([[1:Then
Disp "Please Install","Celtic III.
Pause
ClrHome:Return
End:FnOff :PlotsOff :AxesOff:ZStandard:ZInteger:0→Xmin:1→X
ClrDraw
real(7,0
Text(0,16,"OS    2.43    VALIDATOR
real(12,8,0,0,95,6,1
Text(8,1,"PREPARING ...
det(4,3
expr(sub(Ans,1,1)+"."+sub(Ans,3,2→O
If O<2.43:Then    //Checks if OS is less than 2.43
Text(8,1,"PLEASE    UPGRADE
Text(15,1,"YOUR    OS    VERSION
Text(22,1,"TO    CONTINUE.
Pause
ClrDraw
ClrHome:Return
End
SetUpEditor E
ClrList ⌊E
For(I,1,19
"EF3B
If I=2:"EF38
If I=3:"EF3C
If I=4:"EF31
If I=5:"EF3D
If I=6:"EF34
If I=7:"EF37
If I=8:"EF2E
If I=9:"EF30
If I=10:"EF35
If I=11:"EF32
If I=12:"EF33
If I=13:"EF2F
If I=14:"EF18
If I=15:"EF19
If I=16:"EF1A
If I=17:"EF1B
If I=18:"EF1C
If I=19:"EF1D
det(28,Ans→⌊E(1+dim(⌊E    //Converts Hex code to decimal
End
"rowSwap(Name→Str9
For(I,4,5
det(0,I,Str9     //Formats the appvar Name
End
For(I,1,27
det(32,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZθ",I,1→Str1
If Ans≠".NULLVAR" and Ans≠".P:NT:FN
Then
DelVar G0
Repeat G=length(Str1
sub(Str1,Ans+1,inString(Str1," ",Ans+1)-Ans-1     //This routine separates names from a space-delimited string of program names. For example, if a string containing 'A' names is "ASCII ARCHUDEL AMAZE ", it will extract the names and not the spaces.
det(6,Str9,Ans,det(5,Str9     //Writes the result name to the appvar
inString(Str1," ",G+1→G
End:End
int(ᴇ2I/27
int(Ans%95
real(12,0,0,62,Ans,62,1
End
"OSERROR→Str7
1→O
Lbl SP
For(I,4,5
det(0,I,Str7
End
det(5,Str9)-1→R
real(12,7,0,8,95,63,1
Text(8,1,"SELECT    A    PROGRAM    TO
Text(15,1,"VALIDATE    FOR    OS.
Text(57,1,"PROGRAMS: ",R
Repeat max(K={45,22,105
Text(­1,23,5,sub(" bolduparrow",1+(O>1),1:Text(­1,37,5,sub(" bolddownarrow",1+(O<R),1
Text(30,1,det(5,Str9,O
Repeat Ans
getKey     //Program selection
End:Ans→K
real(12,7,0,29,47,35,1
max(1,min(R,O+(K=34)-(K=25→O
End
Lbl Q
If K≠105:Then
ClrDraw
ClrHome
det(0,4,Str9
DelVar Str2DelVar Str8DelVar Str1DelVar Str7DelVar Str9Return
End:real(12,7,0,8,95,63,1
det(5,Str9,O→Str8:det(5,Str8→R:0→E
9+length(Str8)+expr(sub(det(0,7,Str8),4,5→S     //Calculates EXACT program size
det(6,Str7,"prgm"+Str8,1
det(6,Str7,"Errors:0",2
Text(8,1,"VALIDATING    THE
Text(15,1,"PROGRAM    "+Str8+" ...
Text(29,1,"SIZE:    ",S
Text(36,1,"LINES:    ",R
For(I,1,R
det(5,Str8,I→Str2
If Str2≠".NULLINE
Then
For(J,1,length(Str2
det(28,sub(Str2,J,1
If max(Ans=⌊E:Then
Ans→θ:E+1→E:det(6,Str7,"E:L"+det(1,I)+",C"+det(1,J)+" #"+det(29,θ,1     //Writes what token is on what line and what column it is on.
End:End:End
int(ᴇ2I/R
int(Ans%95
real(12,0,0,62,Ans,62,1
End
real(12,7,0,8,95,63,1
If E:Then
det(8,Str7,"Errors:"+det(1,E),2
Text(8,1,"ERROR!    THIS    PROGRAM
Text(15,1,"IS    NOT    COMPATIBLE
Text(22,1,"THIS    OS.
Text(29,1,"REFER    TO
Text(36,1,"prgmOSERROR    FOR
Text(43,1,"MORE    DETAILS.
Else
Text(8,1,"VALIDATION    SUCCESS!
Text(15,1,"prgm"+Str8+"    SHOULD
Text(22,1,"RUN    WITH    NO
Text(29,1,"PROBLEMS.
Pause
45→K:Goto Q


Every time this is run on OS 2.43 with a program that has 2.53MP commands, it always says "Success!" No matter what bad tokens are in them. What can change for a solution to this? This program is intended to look for you if a program is compatible or not (so you don't have to run a program with a VERSION error with no goto).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement