Texas Instruments TI-86 ユーザーズマニュアル
![Texas Instruments](https://files.manualsbrain.com/attachments/b46f99d826b2b0e0e5f558c5fb6483942eb9216b/common/fit/150/50/c15ea36eb1fb1cce99a3b94668675bfc78ce832d8d727d9a7bb51a125510/brand_logo.gif)
Chapter 20: A to Z Function and Instruction Reference
305
20ATOZ.DOC TI-86, Chap 20, US English Bob Fedorisko Revised: 02/13/01 2:42 PM Printed: 02/13/01 3:05 PM Page 305 of 118
20ATOZ.DOC TI-86, Chap 20, US English Bob Fedorisko Revised: 02/13/01 2:42 PM Printed: 02/13/01 3:05 PM Page 305 of 118
If
‡ program editor
CTL menu
:If
condition
:
command-if-true
:
commands
If condition is true, executes command-if-true.
Otherwise, skips command-if-true. The condition is
true if it evaluates to any nonzero number, or false if it
evaluates to zero.
Otherwise, skips command-if-true. The condition is
true if it evaluates to any nonzero number, or false if it
evaluates to zero.
To execute multiple commands if condition is true, use
If:Then:End
instead.
Program segment:
©
:If x<0
:Disp "x is negative"
:Disp "x is negative"
©
:If
condition
:Then
:
:
commands-if-true
:End
:
:
commands
If condition is true (nonzero), executes commands-if-
true
true
from
Then
to
End
. Otherwise, skips commands-if-
true
and continues with the next command following
End
.
Program segment:
©
:If x<0
:Then
: Disp "x is negative"
: abs(x)¶x
:End
:Then
: Disp "x is negative"
: abs(x)¶x
:End
©