Texas Instruments TI-73 EXPLORER 用户手册

下载
页码 364
Chapter 12: Programming     
233
7312ENG.DOC   CH 12 Programming, English   Julie Hewlett   Revised: 07/29/98 12:17 PM   Printed: 05/19/99 9:02
AM   Page 233 of 32
Write a program named 
RPTLOOP
 that increments two
variables, I and J, and displays the value of J while I‚6.
PROGRAM:RPTLOOP
:0"I
:0"J
:Repeat I|6
:J+1"J
:I+1"I
:End
:Disp "J=",J
:Pause
 
End   
End   8
 
 7
 7
End 
identifies the end of a group of commands. You must
include an 
End
 instruction at the end of each 
For(
While
, or
Repeat 
loop. Also, you must enter an 
End
 instruction at the end
of each 
If-Then
 group and each 
If-Then-Else
 group.
:End
 
Pause   
Pause   8
 
 8
 8
After a program has been executed, the screen is erased.
Therefore, 
Pause
 is useful to suspend program execution until
you press b, or to display value (such as answers or
graphs) and suspend program execution until you press b.
During the pause, the pause indicator is on in the top-right
corner. Press b to resume execution.
Pause
 without value temporarily pauses the program. If the
DispGraph
 or 
Disp
 instruction has been executed, the
appropriate screen is displayed.
:Pause
Pause
 with value displays value on the Home screen. value can
be scrolled.
:Pause
 value
³