Programming
584
Example of Passing Values to a Program
Example of Passing Values to a Program
Example of Passing Values to a Program
Example of Passing Values to a Program
The following program draws a circle on the Graph screen and then draws a horizontal
line across the top of the circle. Three values must be passed to the program: x and y
coordinates for the circle’s center and the radius r.
•
When you write the program in the Program Editor:
Note:
In this example, you cannot use circle as the program name because it
conflicts with a command name.
Before drawing the circle, the program turns off any selected Y= Editor functions,
displays a standard viewing window, and “squares” the window.
In the ( ) beside the program name,
specify the variables that will be
used to store the passed values.
Notice that the program also
contains commands that set up the
Graph screen.
:circ(x,y,r)
Ê
:
Prgm
:FnOff
:ZoomStd
:ZoomSqr
:Circle x,y,r
:LineHorz y+r
:EndPrgm
Ê
Only
circ( )
is initially
displayed on the blank
template; be sure to edit this
line.
Содержание 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 ...