Hey everyone its Spud again. Today I started a project I call CCB, or Computer Compiled Basic. Its pretty simple as far as syntax goes. But this allows for dynamically generated TI-BASIC code. Its pretty simple. Here's a syntax demo:

Code:

import ccb
ccb.echo(var['srt1'])

This will display Str1 but if you where to add an x and a y as the first 2 params you could also use it as an output coammand.

The main purpose of this utility is to generate dynamic basic code. This could be used for a TI-BASIC game maker or for easy updates to a basic program. people will no longer need to download new .8xp files anymore. with this simple program you can auto update your programs from you computer. Here's an example:

Code:

import ccb
#somehow download the TI-BASIC code from your site
comptype = input("for 83+/84+/SE or for 84+CSE")
if comptype == "84+CSE":
    #compile accordingly
else:
    #compile accordingly

Now this doesn't not actually compile the code it just outputs the TI-BASIC equivalent. Heres a sample program that will build an equation solver:

Code:

import ccb
promptvars = input("vars to prompt (separate by commas):")
equation = input("equation:")
# the add code command is used to input raw basic code
ccb.comp.add_code("Prompt "+promptvars)
ccb.echo(equation)
print(ccb.comp.code)

So that's a simple overview of what it does and how you could use it for something usefull. If you have any suggestions please post them below! Thanks! -Spud2451
  
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