Calling A Separate Program; Defining And Calling An Internal Subroutine - Texas Instruments TI-NSPIRE Software Manual

Cas computer software
Hide thumbs Also See for TI-NSPIRE:
Table of Contents

Advertisement

Calling a separate program

To call a separate program, use the same syntax that you use to run the
program from the entry line.
Define subtest1()=
Prgm
For i,1,4,1
subtest2(i,i
EndFor

Defining and calling an internal subroutine

To define an internal subroutine, use the
Prgm...EndPrgm
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.
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)
À
Declares the subroutine as a local variable.
Á
Defines the subroutine.
Â
Calls the subroutine.
Note: Use the Program Editor's
Prgm...EndPrgm
Programming
1000)
¦
. Because a subroutine must be defined before it can be
À
Var
commands.
Define subtest2(x,y)=
Prgm
Disp x,y
EndPrgm
command with
Define
Á
Â
menu to enter the
and
Define
333

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-nspire

Table of Contents