EasyManua.ls Logo

Texas Instruments TI-Nspire

Texas Instruments TI-Nspire
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming 333
Calling a separate program
To call a separate program, use the same syntax that you use to run the
program from the entry line.
Defining and calling an internal subroutine
To define an internal subroutine, use the Define command with
Prgm...EndPrgm. Because a subroutine must be defined before it can be
called, it is a good practice to define subroutines at the beginning of the
main program.
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 menu to enter the Define and
Prgm...EndPrgm commands.
Define subtest1()=
Prgm
For i,1,4,1
subtest2(i,i
¦1000)
EndFor
Define subtest2(x,y)=
Prgm
Disp x,y
EndPrgm
Define 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)
Â

Table of Contents

Other manuals for Texas Instruments TI-Nspire

Related product manuals