Originally Posted by
Korkymann
I am trying to write a program in TI BASIC (TI 83 plus calculator programming) by converting a C++ program I made, but I can't make an If-Else If statement. Does anyone know how I can write If-Else If in TI BASIC? If not, is there a site that can convert C++ to TI BASIC?
PS I am programming in TI BASIC because I can carry my calculator with me, but not my desktop.
I'm not sure if TI BASIC has an "else" syntax. That wasn't in the original BASIC anyway. The way you did "else" in traditional BASIC was:
Code:
if condition then goto label1
true_block
goto label2
label1:
false_block
label2:
It's been a while since I programmed a TI, but I think that's how you have to do it.
EDIT: Or, for multiple chained if-else, you would do:
Code:
if condition1 then goto label1
if condition2 then goto label2
if condition3 then goto label3
goto label4
label1:
block_1
goto label4
label2:
block_2
goto label4
label3:
block_3
goto label4
label4:
Structured programming -- now do you get why it's valuable?