An internal subroutine is called and executed in the same way as a separate program.
: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
Ê
Declares the subroutine as a local variable.
Ë
Defines the subroutine.
Ì
Calls the subroutine.
Use the Program Editor's †
Note:
commands.
Prgm...EndPrgm
Notes about Using Subroutines
Notes about Using Subroutines
Notes about Using Subroutines
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
A subroutine cannot access local variables declared in the calling program. Likewise, the
calling program cannot access local variables declared in a subroutine.
Programming
toolbar menu to enter the Define and
Var
command.
Return
592