>
else
LAST-GROUP
=
THIS-GROUP
;
3
else
(
/*
THIS-GROUP
==
LAST-GROUP
&
LAST-GROUP
!=
0
*/
STORE
(
)
;
3
1
Figure
4-3.
Handling of Value Coupled Commands
For ease of understanding, exception handling is not shown in the
pseudo code.
In
words
:
An execution error in EXEC() discards the current
command and sets LAST-GROUP to 0.
An execution error in CLEAN-UP() discards all pending commands
and sets LAST-GROUP to 0.
A parser error forces execution of
all
pending commands and sets
LAST-GROUP to 0.
-C
Example of processing value coupled commands
Assume a program message composed of commands with the
following group assignments (sufi)
:
AO;
B1;
C1; DO; E2; F2; G3; H3 <CR/LF>
Such a program message would be processed in the following manner:
A
:
THIS-GROUP=O, LAST-GROUP (assumed)=O, A is
executed.
B
:
THIS-GROUP
!=
0, LAST-GROUP
==
0,
B
is made
pending.
C
:
THIS-GROUP
==
LAST-GROUP
!=
0, C is made pending.
D
:
THIS-GROUP
==
0
!=
LAST-GROUP,
B
and C are
executed, D is executed.
E
:
THIS-GROUP
!=
0, LAST-GROUP
==
0,
E
is made
pending.
F
:
THIS-GROUP
==
LAST-GROUP
!=
0,
F
is made pending.
G
:
THIS-GROUP
!=
0
!=
LAST-GROUP, E and F are executed,
G is made pending.
H
:
THIS-GROUP
==
LAST-GROUP
!=
0,
H
is made pending.
<CR/LF>
:
all
pending commands (G and
H)
are executed.
4-12
Understanding the
HP
E1440A
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com