Re: Use of If/Then/Else


[Prev][Next][Index][Thread]

Re: Use of If/Then/Else



On Thu, 14 Nov 1996, Ian Turner wrote:


> What is the syntax of the IF command (and friends)?
> I understand the concept but have lost my manual and can't seem to get
> the syntax right.
> --


On the TI-8x(except 81) there are two syntaxes to it.


The first is
:if <expression>
:<statement>


In this syntax the line immediately following the if statement is ran if
the expression is true
the other is
:if <expression>
:then
:<statement>
:<statement>
.
.
.
: [else]                The else is optional
:<statement>
.
.
.
: end


With this syntax then all of the statements between the then statement
and the else(or end if else is not used) are ran if the expression is
true, and the statements between the else and end statements(if else is
included) are ran if the expression is false.


-MarcII


References: