EasyManua.ls Logo

Texas Instruments TI Programmable 57

Texas Instruments TI Programmable 57
94 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...
Using
subroutines
is
not
only
a
handy
technique
for
saving
program
steps
and
breaking
a
large
program
down
into
easy
to
analyze
segments:
it's
also
just
plain
good
programming
practice.
A
subroutine
is
just
a
"miniprogram”
you
can
write
as
part
of
any
program.
Anytime
you
need
to
use
a
set
of
program
steps
more
than
once
in
a
program,
it's
a
good
idea
to
make
that
series
of
steps
into
a
subroutine.
Here's
how:
To
make
any
series
of
program
steps
into
a
subroutine,
all
you
need
to
do
is:
-Start
the
series
of
program
steps
with
a
Label.
-End
the
series
of
steps
with
an
LIN]
key
sequence.
Subroutines
can
be
of
any
length,
as
long
as
your
entire
program
with
all
its
subroutines
is
no
more
than
50
steps.
To
Use
A
SuBROUTINE
IN
A
PROGRAM:
‘While
in
“learn’'
mode,
anytime
you
need
to
use
any
subroutine,
just
press:
n,
where
n
is
the
label
of
the
subroutine.
You
can
use
(or
“call’’,
as
is
sometimes
said),
a
subroutine
as
many
times
as
you'd
like
in
a
program.
When
the
program
pointer
comes
to
a
n
key
sequence
in
a
program,
the
calculator
does
the
following
things
for
you
(illustrated
in
the
diagram);
(1)
First,
it
“notes’’
the
step
in
the
program
where
the
n
instruction
occurs
in
a
special
i
Calculator
remembers
next
program
step.
memory
(called
the
subroutine
return
memory).
bk
(@
The
program
pointer
goes
E
tight
to
label
n
and
starts
executing
the
instructions
after
it,
until
it
comes
to
the
[Nv]
instruction.
()
When
the
program
pointer
reaches
the
[INV)
instruction,
it
returns
to
the
point
where
the
subroutine
was
"called",
and
continues.
SusRourTine
3-11

Related product manuals