Calling a program from another program – Texas Instruments TI-86 User Manual

Page 236

Advertising
background image

224

Chapter 16: Programming

16PROG.DOC TI-86, Chap 16, US English Bob Fedorisko Revised: 02/13/01 2:36 PM Printed: 02/13/01 3:04 PM Page 224 of 16

16PROG.DOC TI-86, Chap 16, US English Bob Fedorisko Revised: 02/13/01 2:36 PM Printed: 02/13/01 3:04 PM Page 224 of 16

16PROG.DOC TI-86, Chap 16, US English Bob Fedorisko Revised: 02/13/01 2:36 PM Printed: 02/13/01 3:04 PM Page 224 of 16

Calling a Program from Another Program

On the TI

-86, any stored program can be called from another program as a subroutine. In

the program editor, enter the subroutine program name on a command line by itself.

Press 8 to display the

PRGM

NAMES

menu, and then select the program name.

Use ALPHA keys and alpha keys to enter the program name’s individual characters.

When the program name is encountered as the calling program runs, the next command
executed is the first command in the subroutine. It returns to the next command in the
calling program when it encounters

Return

(or implied

Return

) at the end of a subroutine.

Calling program

Input

à

Output

Subroutine

label

used with

Goto

and

Lbl

is local to the program where it is located. label in one program is not

recognized by another program. You cannot use

Goto

to branch to a label in another program.

Advertising