I'm currently developing a volume finder that now has surface area! It also includes a program for area and perimeter, and also a miscellaneous math program. Total space as of version 1.0 is 2400. 1.1 is in the works! Give me suggestions for new shapes, and notify me of any bugs(which I don't think there is any).
You can't compile a TI Basic program. Wink What do you mean by it uses I/O instead of Prompt/Disp?
souvik1997 wrote:
You can't compile a TI Basic program. Wink What do you mean by it uses I/O instead of Prompt/Disp?


Input/Output commands instead of the common Prompt/Disp commands.
Ah, okay. How is it compiled?
souvik1997 wrote:
Ah, okay. How is it compiled?

My bad, I meant compilation. I'm not that good with words Sad
You mean, how do you compile TI Basic programs? Or how do you optimize them?
_player1537 wrote:
You mean, how do you compile TI Basic programs? Or how do you optimize them?

Whichever one makes sense Very Happy
Optimizing programs is getting programs to be smaller and run faster without sacrificing features, and compiling is converting code to machine language.
souvik1997 wrote:
Optimizing programs is getting programs to be smaller and run faster without sacrificing features, and compiling is converting code to machine language.

Okay, I'll go with optimize
Optimizing makes sense for TI Basic. Kerm gave you a link that you said you've downloaded called something along the lines of "The 1337 Basic Guide" that has many many optimization tips and tricks in it. If you want, you can run your program through SourceCoder and we can try to help you optimize it (if/when you post it here, of course).

Also, just a quick note on etiquette here, you can't make a post within 24 hours of your most recent one if no one has replied to it. You haven't done it yet, but it is probably easier if we just tell you it now Smile There are, of course, exceptions, but most of the time, it is safe to just edit your previous post than to add a new one.
The NEW version is out! Check it out on the archives(when it's uploaded).
You should post screenshots here using WabbitEmu or your TI calculator computer linking software. Smile
souvik1997 wrote:
You should post screenshots here using WabbitEmu or your TI calculator computer linking software. Smile

I'm lazy, but I'll be sure to put the SS's on the next version(1.1). Smile
Hey, cousin! Smile Put me as an author. We can work on it together, and trust me. I'm awesome at loops. TI-84+ SE FTW!
Or you could post the source here with SourceCoder and we can all help you with it.
souvik1997 wrote:
Or you could post the source here with SourceCoder and we can all help you with it.

I think he has, but maybe he hasn't made it public?
Alright, guys. Here is the AREA FINDER being made public:

BASIC Code wrote:
::"AreaFinder 1.0
:ClrHome
:Disp "AreaFinder 1.0
:Pause
:Lbl A
:DelVar A:DelVar B:DelVar C:DelVar H:DelVar P:DelVar R:DelVar θ
:Menu("Choose Shape","Square",1,"Rectangle",2,"Parallelogram",3,"Rhombus",4,"Trapezoid",5,"Next",6,"UltimateMath",7
:Lbl 1
:ClrHome
:Input "Base:",B
:B²→A
:4B→P
:Output(2,1,"Area:
:Output(3,1,A
:Output(4,1,"Perimeter:
:Output(5,1,P
:Pause
:Goto A
:Lbl 2
:ClrHome
:Input "Side A:",A
:Input "Side B:",B
:A→θ
:AB→A
:2(θ+B)→P
:Output(3,1,"Area:
:Output(4,1,A
:Output(5,1,"Perimeter:
:Output(6,1,P
:Pause
:Goto A
:Lbl 3
:ClrHome
:Input "Base:",B
:Input "Height:",H
:Input "Side:",A
:A→θ
:BH→A
:2(θ+B)→P
:Output(4,1,"Area:
:Output(5,1,A
:Output(6,1,"Perimeter:
:Output(7,1,P
:Pause
:Goto A
:Lbl 4
:ClrHome
:Input "Base:",B
:Input "Height:",H
:BH→A
:4B→P
:Output(3,1,"Area:
:Output(4,1,A
:Output(5,1,"Perimeter:
:Output(6,1,P
:Pause
:Goto A
:Lbl 5
:ClrHome
:Input "Base1:",B
:Input "Base2:",G
:Input "Height:",H
:Input "Side A:",A
:Input "Side C:",C
:A→θ
:1/2(B+G)H→A
:θ+B+G+C→P
:Output(6,1,"Area:
:Output(7,1,A
:Output(8,1,"Perimeter:
:Output(8,11,P
:Pause
:Goto A
:Lbl 6
:ClrHome
:Menu("Choose Shape","Circle",8,"Triangle",9,"Back",A
:Pause
:Goto A
:Lbl 7
:prgmULTMATH
:Lbl 8
:ClrHome
:Input "Radius:",R
:πR²→A
:2πR→C
:Output(2,1,"Area:
:Output(3,1,A
:Output(4,1,"Circumference:
:Output(5,1,C
:Pause
:Goto 6
:Lbl 9
:ClrHome
:Input "Base:",B
:Input "Height:",H
:1/2BH→A
:Output(3,1,"Area:
:Output(4,1,A
:Pause
:Goto A
Generated by SourceCoder, © 2005-2011 Cemetech
Please don't double post here, unless it's been 12-24 hours between your last post in the thread. Regarding the code, I see some things that could be optimized, so we'll see how that goes.
You could easily eliminate 3 or 4 of those options if you used the formula for an n-gon instead of explicit formulae for each. Also, the Inputs could in some cases be more efficiently done using only one Input.

As for general code, I'd recommend a couple of things. First, eliminate the Goto's. They're nice commands and they're very useful in ASM/Axe, but the way they've led you to structure your program means that there's a lot of redundant code in it. Secondly, I don't see any way for users to exit your program without pressing the ON button. Proper exit conditions are important, because it's quite annoying to run a program and be forced to use the emergency exit. Finally, I'd highly recommend that you use a GUI of some sort rather than Menu(). While the Menu() command is nice for quick mock-ups, it's not very well regarded by most programmers if you ever plan on using it. Doors CS offers a nice set of GUI libaries and you can do pretty impressive interfaces in pure BASIC alone. I don't know your skill level though, so you might want to wait before attempting a useful GUI if you're still learning the language.

On a side note, you did a good job with the basic optimizations like eliminating parentheses.
Qwerty.55 wrote:
You could easily eliminate 3 or 4 of those options if you used the formula for an n-gon instead of explicit formulae for each. Also, the Inputs could in some cases be more efficiently done using only one Input.

As for general code, I'd recommend a couple of things. First, eliminate the Goto's. They're nice commands and they're very useful in ASM/Axe, but the way they've led you to structure your program means that there's a lot of redundant code in it. Secondly, I don't see any way for users to exit your program without pressing the ON button. Proper exit conditions are important, because it's quite annoying to run a program and be forced to use the emergency exit. Finally, I'd highly recommend that you use a GUI of some sort rather than Menu(). While the Menu() command is nice for quick mock-ups, it's not very well regarded by most programmers if you ever plan on using it. Doors CS offers a nice set of GUI libaries and you can do pretty impressive interfaces in pure BASIC alone. I don't know your skill level though, so you might want to wait before attempting a useful GUI if you're still learning the language.

On a side note, you did a good job with the basic optimizations like eliminating parentheses.

EDIT: There is a quit option, but it's on the ULTMATH program which I haven't released the source for. I'm also going to start working on this project alongside my cousin.
  
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