If Command; If...then...endif Structures - Texas Instruments TITANIUM TI-89 User Manual

Titanium graphing calculator
Hide thumbs Also See for TITANIUM TI-89:
Table of Contents

Advertisement

If Command

If Command
If Command
If Command
To execute only one command if a conditional test is true, use the general form:
:If x>5
Ê
:
Disp "x is greater than 5"
Ë
:Disp x
Ê
Executed only if x>5; otherwise, skipped.
Ë
Always displays the value of x.
In this example, you must store a value to x before executing the
Use indentation to make your programs easier to read and understand.
Note:

If...Then...EndIf Structures

If...Then...EndIf Structures
If...Then...EndIf Structures
If...Then...EndIf Structures
To execute one group of commands if a conditional test is true, use the structure:
:If x>5 Then
Ê
:
Disp "x is greater than 5"
Ê
:
2†x!x
Ë
:EndIf
:Disp x
Ê
Executed only if x>5.
Ë
Displays value of:
• 2x if x>5
• x if x
{
5
Programming
command.
If
607

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-89 voyage 200Titanium ti-89

Table of Contents