Programming
610
Because a
Goto
command is unconditional (it always branches to the specified label), it
is often used with an
If
command so that you can specify a conditional test. For example:
Ê
If x>5, branches directly to label GT5.
Ë
For this example, the program must include commands (such as
Stop
) that prevent
Lbl
GT5
from being executed if x
{
5.
Using Loops to Repeat a Group of Commands
Using Loops to Repeat a Group of Commands
Using Loops to Repeat a Group of Commands
Using Loops to Repeat a Group of Commands
To repeat the same group of commands successively, use a loop. Several types of loops
are available. Each type gives you a different way to exit the loop, based on a conditional
test.
F2 Control Toolbar Menu
F2 Control Toolbar Menu
F2 Control Toolbar Menu
F2 Control Toolbar Menu
Ê
Ë
:If x>5
: Goto GT5
:Disp x
:--------
:--------
:Lbl GT5
:Disp "The number was > 5”
To enter most of the loop-related commands,
use the Program Editor’s
„
Control
toolbar
menu.
Содержание Voyage 200
Страница 36: ...Getting Started 36 D B D B Press Result ...
Страница 45: ...Getting Started 45 3 0 D B D D B D Press Result ...
Страница 46: ...Getting Started 46 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Страница 60: ...Getting Started 60 B D Press Result ...
Страница 139: ...Previews 139 8 Complete the operation Press 2 d Steps and keystrokes Display 5 f 2 ...
Страница 181: ...Operating the Calculator 181 From the Keyboard From the Keyboard From the Keyboard From the Keyboard ...
Страница 453: ...Differential Equation Graphing 453 ...
Страница 468: ...Tables 468 ...
Страница 515: ...Split Screens 515 Note Both Top Bottom and Left Right splits use the same methods to select an application ...
Страница 777: ...Activities 777 ...