Programming
577
An internal subroutine is called and executed in the same way as a separate program.
Ê
Declares the subroutine as a local variable.
Ë
Defines the subroutine.
Ì
Calls the subroutine.
Note:
Use the Program Editor’s
†
Var
toolbar menu to enter the Define and
Prgm...EndPrgm
commands.
Notes about Using Subroutines
At the end of a subroutine, execution returns to the calling program. To exit a subroutine
at any other time, use the
Return
command.
A subroutine cannot access local variables declared in the calling program. Likewise, the
calling program cannot access local variables declared in a subroutine.
Ê
Ë
©
Ë
Ì
:subtest1()
:Prgm
:local subtest2
:Define subtest2(x,y)=Prgm
: Disp x,y
:EndPrgm
:
¦
Beginning of main program
:For i,1,4,1
: subtest2(i,I*1000)
:EndFor
:EndPrgm
Summary of Contents for Titanium TI-89
Page 9: ...Getting Started 6 TI 89 Titanium keys Ë Ì Í Ê ...
Page 34: ...Getting Started 31 2 or D 2 B u s i n e s s D B D B Press Result ...
Page 43: ...Getting Started 40 3 0 D B D D B D Press Result ...
Page 44: ...Getting Started 41 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Page 58: ...Getting Started 55 Example Set split screen mode to TOP BOTTOM Press Result 3 B D ...
Page 70: ...Getting Started 67 ...
Page 175: ...Operating the Calculator 172 From the Keyboard ...
Page 456: ...Tables 453 ...
Page 527: ...Data Matrix Editor 524 ...