» Goto page 1, 2  Next

Code:
```:Disp "Electro/Thermo EQ" :Disp "Input 1 for electro" :Disp "Input 2 for Thermo" : :Input A : :If(A = 1) :Disp "ΔS=ΔH(fusion)/273" :Disp "ΔS(univ)=ΔS(sys)+ΔS(surr)>0" :Disp "S=KlnW" :Disp "ΔS=∑nS(products)-∑mS(reactions)" :Disp "ΔS(surr)=-ΔH(sys)/273" :Disp "ΔG=ΔH-TΔS" :Disp "ΔG°=∑nΔG(products)-∑nΔG(reactants)" :Disp "ΔG=ΔG°+RTlnQ" :Disp "ΔG°=-RTlnK" : :If(A=2) :Disp "E°(cell)=E°(red(Cathode))-E°(red(anode))" :Disp "ΔG=-nFE" :Disp "m=(It/ℱ)(M/n)"```

This should work right?
Assuming you have multiple lines in those If-blocks, the If should be a If:Then, and there should be an End at the end of the code for that If statement. Also, there is a space in an If statement, after the word If.
Im confused by If:Then...
Added code tags to original post.

What souvik said, don't forget the end statement. This would be better:

Code:
```:Disp "Electro/Thermo EQ" :Disp "Input 1 for electro" :Disp "Input 2 for Thermo" : :Input A : :If A=1 :Then :Disp "ΔS=ΔH(fusion)/273" :Disp "ΔS(univ)=ΔS(sys)+ΔS(surr)>0" :Disp "S=KlnW" :Disp "ΔS=∑nS(products)-∑mS(reactions)" :Disp "ΔS(surr)=-ΔH(sys)/273" :Disp "ΔG=ΔH-TΔS" :Disp "ΔG°=∑nΔG(products)-∑nΔG(reactants)" :Disp "ΔG=ΔG°+RTlnQ" :Disp "ΔG°=-RTlnK" :End : :If A=2 :Then :Disp "E°(cell)=E°(red(Cathode))-E°(red(anode))" :Disp "ΔG=-nFE" :Disp "m=(It/ℱ)(M/n)" :End```
THANKS
Tarax3n wrote:
Im confused by If:Then...
Do you understand IF:THEN now? Or do you still require clarification?
Sure thing. If you need a quick reference for some BASIC tutorials, these two links should help:

http://cemetech.net/projects/btutor/
http://tifreakware.net/tutorials/83p/b/

Still getting errors....
What types of errors, when you press 2 for goto, what line does it take you to?
What errors?
Ninja'd
Tarax3n wrote:
Still getting errors....
Are you using this format? What errors? What does your code look like? Be sure to give us all the information we need to diagnose your problem when you ask for help!

Code:
``` If (condition) Then (statement) (statement) ... End```
Edit by Kerm: Please use code tags!
Code:
```547 bytes for the final corrections with 21 errors. Error on line 11 at "...=∑nS(products)-∑mS(reactions...". Error on line 11 at "...∑nS(products)-∑mS(reactions)...". Error on line 11 at "...1;nS(products)-∑mS(reactions)" Error on line 11 at "...-∑mS(reactions)" :Disp "   ...". Error on line 11 at "...∑mS(reactions)" :Disp "[...". Error on line 11 at "...1;mS(reactions)" :Disp "ΔS(s...". Error on line 14 at "...G°=∑nΔG(products)-∑n   ...". Error on line 14 at "...=∑nΔG(products)-∑nΔ...". Error on line 14 at "...∑nΔG(products)-∑nΔ...". Error on line 14 at "...1;nΔG(products)-∑nΔG(rea...". Error on line 14 at "...-∑nΔG(reactants)" :Dis...". Error on line 14 at "...∑nΔG(reactants)" :Disp...". Error on line 14 at "...1;nΔG(reactants)" :Disp "   ...". Error on line 15 at "...G°+RTlnQ" :Disp "ΔG°=-RTlnK"...". Error on line 16 at "...G°=-RTlnK" :End : :I...". Error on line 21 at "...E°(cell)=E°(red(Cathode))-E°(red(anode))...". Error on line 21 at "...E°(red(Cathode))-E°(red(anode))" ...". Error on line 21 at "...E°(red(anode))" :Disp "ΔG=-n...". Error on line 23 at ".../ℱ)(M/n)" :End...". Error on line 23 at "...ℱ)(M/n)" :End...". Error on line 23 at "...7;)(M/n)" :End...".```
Whoa whoa. Are you compiling this as an ASM, assembly, program?

Not on calc as a BASIC program?
is this due to my special symbols?
Tarax3n, are you getting this on your calculator or from a computer program?

Type the code from my first post onto your calculator Under PRGM, and New. Name it, then type in the code.
Its the symbols i need so I used the cemetech program maker
Tarax3n wrote:
is this due to my special symbols?

Yes. SourceCoder can't export those symbols, since they don't exist on a calc.
dam
thanks anyways
Tarax3n wrote:
dam
thanks anyways
You can of course fake some of those symbols on-calc, but you can't get the exact equivalents.
KermMartian wrote:
Tarax3n wrote:
dam
thanks anyways
You can of course fake some of those symbols on-calc, but you can't get the exact equivalents.

Hmm, can't you use Omnicalc or the like for that? O-o I remember when I was trying something with symbols ><

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.

»
» Goto page 1, 2  Next
» 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