These are the couple of programs I've made - the reason I'm posting them is because I am hoping someone can take a look at them (they're really short) and tell me if there's anything I'm doing wrong/inefficiently. Thanks.


*EDIT*

Main Program

Code:
:ClrHome
:Menu("-MAIN MENU-","LENGTH",1,"AREA",2,"WEIGHT/VOLUME",3,"TEMPERATURE",4,"QUIT",5)
:
:Lbl 1
:prgmCONVθ002
:
:Lbl 2
:prgmCONVθ003
:


One of the sub programs

Code:
:ClrHome
:Menu("-MENU-","M2->FT2",1,"KM2->MI2",2,"FT2->M2",3,"MI2->KM2",4,"BACK",5)
:
:Lbl 1
:Prompt X
:Output(3,1,"FT2=")
:Output(5,1,10.76X)
:Goto 6
:
:Lbl 2
:Prompt X
:Output(3,1,"MI2=")
:Output(5,1,.3861X)
:Goto 6
:
:Lbl 3
:Prompt X
:Output(3,1,"M2=")
:Output(5,1,.0929X)
:Goto 6
:
:Lbl 4
:Prompt X
:Output(3,1,"KM2=")
:Output(5,1,2.59X)
:Goto 6
:
:Lbl 5
:prgmCONVθ001
:
:Lbl 6
:Output(8,1,"ENTER TO PROCEED")
:Pause
:prgmCONVθ001
Beta7 wrote:
These are the couple of programs I've made - the reason I'm posting them is because I am hoping someone can take a look at them (they're really short) and tell me if there's anything I'm doing wrong/inefficiently. Thanks.

http://cid-700304042c1196c0.office.live.com/self.aspx/.Public
A tip: it's easier for everyone if you simple post some sample source code in text form so we can stare at it and make suggestions and comments and optimizations. Luckily, I've made a handy tool for the purpose that's also an online IDE and editor:

http://sc.cemetech.net (SourceCoder 2.5)
Sorry, didn't feel like typing it all out, and didn't think to check for a program that wouldtake source code from a calc program. Sad
Beta7 wrote:
Sorry, didn't feel like typing it all out, and didn't think to check for a program that wouldtake source code from a calc program. Sad
No problem, most people wouldn't. Smile All you need to do is feed in a .8xp, and it will spit out phpBBCode already formatted properly for copying-and-pasting to here.
Beta7, I optimized your code a little for you. Note that this isn't the complete program, just an optimized version of your source code.

Code:
ClrHome
Disp "UNIT CONVERTER
Lbl ST
Pause
Clrhome
Menu("-MAIN MENU-","LENGTH",1,"AREA",2,"WEIGHT/VOLUME",3,"TEMPERATURE",4,"QUIT",RT
Lbl 2
Prompt X
Menu("-MENU-","M^2->FT^2",A1,"KM^2->MI^2",A2,"FT^2->M^2",A3,"MI^2->KM^2",A4,"BACK",ST
Lbl A1
Disp "FT^2=",10.76X
Goto ST
Lbl A2
Disp "MI^2=",.3861X
Goto ST
Lbl A3
Disp "M^2=",.0929X
Goto ST
Lbl A4
DIsp "KM^2=",.59X
Goto ST
Lbl 1
//Length
Lbl 3
//Weight/volume
Lbl 4
//Temperature
Goto ST
Lbl RT

Nice optimizations! I think I'd like that better with a DCS GUI menu, though. Smile
  
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