A very useful feature collection that could be added to SourceCoder is an automatic TI-BASIC program optimizer. For example, it would delete closing parentheses and quotation marks, find redundancies like:

Code:
Disp "HELLO!
Pause

and replace them, for example:

Code:
Pause "HELLO!

It could also combine commands that require no new line/colon; it could change:

Code:
Archive X
DelVar A

to:

Code:
Archive X DelVar A

A bit more complicated would be higher-level optimization like replacing While loops with For loops wherever possible, etc.
I am no expert on program optimization, as I am sure people like KermM are. Perhaps some of the optimizations I mentioned have drawbacks, and there are definitely many optimizations I did not mention.
Could somebody please look into coding an optimizer into SourceCoder?
SourceCoder 1 and 2 had exactly this feature, originally incorporated from a tool called OptiBASIC written by Brazucs (now MysteryGuitarMan). However, since text replacement is a pretty bad way to modify code, and a true parser isn't worthwhile, the feature was little-used and was removed in SourceCoder 3.
  
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