Code:
:Ans→Str7
:ClrList∟STR
:1→I
:For(I,1,length(Str7
:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
:inString(Ans,sub(Str7,I,1))→∟STR(I)
:End
:DelVar Str7ClrHome
:Disp "CONVERTED STR","IN ∟STR"


And


Code:
:DelVar IAns→∟TEMP
:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz→Str0
:sub(Ans,∟TEMP(1),1)→Str7
:For(I,2,dim(∟TEMP
:Str7+sub(Str0,∟TEMP(I),1→Str7
:End
:ClrHome
:Disp "CONVERTED LIST","IN Str7"

What do you guys think?
Any optimizations? :O
For the first code I wouldn't think it is necessary to store 1 to 'I' since the "For(" loop will do that For(you). For both codes I should remind that it's not necessary to always put the ending parentheses and quotes even immediately before the store token. I believe parsing the program through SourceCoder will do those optimizations for you. Other than that it's pretty solid.

The same thing for the second code; you don't need to delete 'I' since "For(" will store 2 to it initially anyways. Here's what I'd do


Code:
:Ans→∟TEMP
:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz→Str0
:"→Str7
:For(I,1,dim(∟TEMP
:sub(Str7,∟TEMP(I),1
:If length(Str7
:Str7+Ans
:Ans→Str7
:End
:ClrHome
:Disp "CONVERTED LIST","IN Str7


I don't know if it needs to be explained but as you can see, it can save a few bytes.
http://www.cemetech.net/forum/viewtopic.php?t=1479
D'oh D:
Oh well, nice knowing I'm able to code it Very Happy

Code:

seq(inString("ABCDEFG ... Z? .",sub(Str1,N,1)),N,1,length(Str1
precisely!


Code:

seq(inString("ABCDEFG ... Z? .",sub(Str1,N,1)),N,1,length(Str1



Code:
:":
:For(N,1,dim(L1
:Ans+sub("ABCDEFG ... Z? .",L1(N),1
:End
:sub(Ans,2,dim(L1
  
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