Intel AEDIT-86 Life Jacket User Manual


 
AEDIT -86
User
9
s Guide Macro Commands
A cursor movement command prefixed by /
is
never marked as failed.
If
the
SET
Go option
is
on, the
(-)FIND
and
(?)REPlACE
commands are never
marked failed.
When a command
in
a macro is marked as failed, the following occurs: Macro execu-
tion is terminated, and control
is
returned to the caller.
If
the caller
is
main command
level,
AEDIT
-86 simply waits for the next command.
If
the caller itself
is
a macro,
execution continues with the
caller's next command.
Example
Macro
A:
Macro
B:
Macro
C:
/E(XECUTE)
B
E(XECUTE)
C
E(XECUTE)
D
J(UMP)
S(tart)
/R(EPLACE)
••
(
nl)
(nl)"
with"
(
nl
) ,.
S(ET)
G(o)
Y(es)
J(UMP)
S(tart)
/R(EPlACE)
"DCl"
with
"DECLARE"
J(UMP)
S(tart)
/R(EPLACE)
"IS"
with
"lITERAllY"
A value for
SET
Go
in
macro A is meaningless, because it does not contain a
(-)FIND
or
(?)REPLACE
command. When
/EXECUTE
B
is
terminated either
normally or because macro B failed, macro C
is
executed. Likewise, when macro
C is terminated, macro D
is
executed.
SET
Go must be set to
No
(the default) for macro
B.
The
REPLACE
command
is successful as long as the file contains at least one
(nl)
(nl)
sequence. When
the
file contains no
(nl)
(nl)
sequences, macro B fails, execution of macro B
is terminated, and macro C is executed.
If
SET
Go
is
Yes for macro
B,
it will
never fail, and execution
of
macro B would enter an infinite loop.
SET
Go must be set to Yes for macro C. This option ensures that the second
REPLACE
command
is
performed regardless of the results of the first
REPLACE
command.
S(ET)
G(o) Y(es) could be placed after the
JUMP
command, and
the
effect would be the same.
If
you
are
not careful
in
coding your macro,
it
might enter an infinite loop when it
executes. To exit from such a macro or to terminate any macro, press
(CTRl-C).
5.9
Screen Display during Macro Execution
To
speed up macro execution, the amount
of
data
written to the screen while a macro
is executing
is
reduced to a minimum. Only selected text or information is sent to the
screen. The information in this section
is
given for reference.
5.9.1
Text
If
SET
Display
No
(the
default)
is
in
effect, changes
in
the text and cursor movements
are
displayed on the screen as long as the cursor does not leave
the
current display
screen, or until a
VIEW
command (either explicit
or
implicit) is issued. When the
cursor leaves the screen or a
VIEW
command is issued, screen display
is
frozen until
the
macro execution terminates. Then, an implicit VIEW command is performed
using the current logical cursor location.
5-9