Checker's Tutorial
For conditionals that only execute one statement, no "then"
is needed (similar to code blocks in higher-level languages)
Example:
However,
For conditionals that execute multiple statements, a code
block is needed and can be setup by using "Then" and "End"
Example
Make sure you have an End where there is a Then, if not you
will have memory leaks that can cause your program to crash.
------------------------------------------------------------
Additionally,
You can use Else statements with If/Then/End statements
Consider the following high-level code segment:
In TI-BASIC, this would be written like so:
is needed (similar to code blocks in higher-level languages)
Example:
:If X=5
:Disp "X IS EQUAL TO 5"
------------------------------------------------------------ However,
For conditionals that execute multiple statements, a code
block is needed and can be setup by using "Then" and "End"
Example
:If X=5
:Then
:Disp "X IS EQUAL TO 5"
:Disp "PROGRAM DONE!"
:End
Make sure you have an End where there is a Then, if not you
will have memory leaks that can cause your program to crash.
------------------------------------------------------------
Additionally,
You can use Else statements with If/Then/End statements
Consider the following high-level code segment:
if( X=5 && Y=2 )
{
statement;
statement;
}
else
if( X=2 || Y=5 )
{
statement;
statement;
}
else
{
statement;
statement;
}
In TI-BASIC, this would be written like so:
:If X=5 and Y=2
:Then
:Statement
:Statement
:Else
:If X=2 or Y=5
:Then
:Statement
:Statement
:Else
:Statement
:Statement
:End



