TI-Basic 84 Programming/Conditional Functions

From Wikibooks, open books for an open world
< TI-Basic 84 Programming
Jump to: navigation, search

[edit] If

If, PRGM:CTL:1, is a command that, when it's condition is true, will execute the next line of code. If the condition happens to be false, then the program will skip to the second line of code after the statement.

[edit] Syntax: If

:If condition
  • Where condition either an (in)equality (X=3, A>B), or an expression (5+2X), which resolves to be either true (non-zero) or false (zero).


[edit] Ex: If

PROGRAM:TEMP
:5→X
:If X>3
:Disp "X IS MORE THAN 3"
:Disp "END OF PROGRAM"
pgrmTEMP
X IS MORE THAN 3
END OF PROGRAM
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export