Texas TI-86 用户手册

下载
页码 431
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.
To execute multiple commands if condition is true, use
If:Then:End
 instead.
Program segment:
  
©
:If x<0
:Disp "x is negative"
  
©
:If 
condition
:Then
:
commands-if-true
:End
:
commands
If condition is true (nonzero), executes commands-if-
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
  
©