(
c'
'iJ
Sf·SUM2
N
[1]
Sf'O
[2J
It-l
[3]
C H E C K :
~
( I::· N ) /
()
..
----
Branch
to
0 (terminate the function)
[I.~]
Sf'S+:!:
or
fall through.
[5]
I~"I+1
[6]
"~CHECI<"
SUM2
~5
:L
~::;
'iJ
St-SUM3
N
[:I. J Sf'(}
[2]
I
~
..
O
[3]
CHECI( :
S~"S+
I
[I·I·J
If·I+:!.
[
~:j
:t
-+
( I
:~N)
/CHECI<V
...
Branch
to
CHECK or fall through.
SUM~5
!:=j
1 t:·
,.,
Several
forms
of
the branch instruction
are
shown in the following table:
Branch
Instruction
Result
-+L.ABEL
-+0
Branches
to
a statement labeled
LABEL
Exits function
-+L.ABELx
X::::Y
Branches
to
LABE L
or
exit
function
Branches
to
L 1, L2,
or
L3
~«X<Y)I(X=Y»)(X>Y»/Ll,L2)L3
oof.(Ll.IL2)[1+X::::Y]
Branches
to
L 1 or L2
-~(X::::,()/O
Exits function or falls through
to
next statement
-+
(X:'.::'()
/L.'~BEL
}
Branches
to
LABE L
or
falls through
-+
(X::::Y)
pLABEI...
Note: Branching will
also
work
if
a specific statement number
is
specified
to
the
right
of
the~.
For example,
~3
means
branch
to
statement 3;
or
~1+-3xA
means
I
is
assigned
the value
of
3 times the value
of
A,
and
the value
of
I
is
then
used
as
the branch
to
statement number. However, these forms
of
branching (using
statement numbers instead
of
labels)
can
cause
problems
if
the
function
is
edited
and
the statements
are
renumbered.
Local and Global Names
A local
name
is
the
nam~
of
a variable
or
user-defined
function
that
is
used
only
within
a particular user-defined function. A global
name
is
the name
of
a variable
or user-defined
function
that
can
be
used
within
a user-defined
function
and
can
also
be
used
outside
of
it.
An example
of
the
use
of
a local variable name would
be
the
name
of
a counter
used
in a user-defined function (which
is
not
required
for
any
use
outside the function).
139