Intel AEDIT-86 User Manual

inter
AEDIT
USER'S
-86
TEXT EDITOR
GUIDE
Copynght Intel Corporation,
(1')
3065 Bowers Avenue, Santa ClalCl Call1orrlla 95051
Order
Number:
121756-003
AEDIT-86
USER'S GUIDE
Order Number: 121756-003
TEXT
EDITOR
I
Intel Corporation, 3065 Bowers Avenue, Santa Clara,
Copyright © 1983, 1984 Intel Corporation
CA
95051
r
Additional copies
of
this manual or other Intel literature may be obtained from:
Literature
Department Intel Corporation 3065 Bowers Avenue Santa
Clara,
CA
95051
Intel retains local sales office
Intel Corporation makes no warranty to, the implied warranties no responsibility for any errors to
update
Intel Corporation assumes no responsibility for the use an
Intel product.
Intel software products cation or disclosure
the
right to make changes to these specifications to
obtain the latest specifications before placing your order.
of
of
merchantability and fitness for a particular purpose. Intel Corporation assumes
that
any kind with regard to this material, including. but not limited
may
appear
in
this document. Intel Corporation makes no commitment
at
any time, without notice. Contact your
nor to keep current the information contained in this document.
of
No
other
circuit patent licenses are implied.
are
copyrighted by and shall remain the property
is
subject to restrictions stated
any circuitry
in
Inters
software license, or as defined in
other
than circuitry embodied in
of
Intel Corporation. Use, dupli-
7-104.9(a)(9).
No
part
of this document may be copied or reproduced
in
any form or by any means without the prior
written consent of Inlel Corporation.
The
following are trademarks of Intel Corporation and its affiliates and may only be used to identify Intel
products:
BITBUS COMMputer CREDIT Data Pipeline Genius
i
l>
I
121CE ICE
iCS iDBP iDIS iLBX
im iMMX
Insile
l
inte intelBOS Intelevision intcligent Identifier inteligcnt Programming Intellee Intellink iOSP iPDS iRMX
iSBC
iSBX iSD'i
iSX'i
KEPRO'i Library Manager
MCS
Megaehas~is
MICRO\t-\I'FRAME MU.TI8lS
Mel
TlCHA
MlLTI\lODLlE
"El
Plug-.o\-Bubble PROMPT Prom
...
are QueX QLEST Ripplemode RMX/80 RUPI Seamless SOLO
SYSTE \1
2000
UPI
ASPR
ii
Al344 / 385 / 6K / DD / KH
SOFlWARE
REV.
REVISION
HISTORY
DATE
APPD.
-001
-002
-003
Original issue.
Includes terminals.
Corrects bugs; adds and local and global variables; adds features command; OTHER
additionaJ
KILL_
buffer.
WND
adds
macro
PARAGRAPH.
commands; adds
invocation
files
controls;
for
non-Intel
WINDOW,
CALC
and
to
SET
enlarges
1/83
5/83
12/84
M.K.S.
1Il
PREFACE
This manual provides instructions for using the AEDIT-86 interactive text editor. AEDIT-86 and
iRMX
or
iRMX),
systems is given in
This manual puters
The
manual
Part
It
includes a tutorial, edit command descriptions, and a description
invocation.
Chapter necessary provides a brief tutorial session.
Chapter and
Chapter ordered in the chapter by subjects and without forward references (as much as possible). AEDIT-86 commands not mentioned Part
Chapter and
can be run within several environments including Series
operating system. Basic knowledge of your system
is
assumed. Specific information on running AEDfT-86 on different
the
appendixes.
is
for both
and text editors.
is
organized
I provides the basic information a user needs to use the
1,
"Introduction and Tutorial," defines the hardware and software
to
2,
"The
provides an in-depth description
3, "Editing Commands," describes editing commands. Commands are
II.
4,
"AEDIT-86
the invocation controls.
new
users and those who are already familiar with microcom-
in
two parts as follows:
run AEDIT-86, describes invoking and leaving the editor, and
Editor Basics," describes concepts essential to using
of
the AEDIT-86 display.
in
this chapter are described
Invocation," describes the invocation command syntax
(ISIS
AEDIT
Ill,
Series IV,
and
RUN,
iNDX
-86 text editor.
of
the AEDIT-86
AEDIT
-86
in
Part
II lists more advanced uses of AEDIT-86 and describes the AEDIT-86 string. numeric, local, and global variables, the macro-related Execute,
Appendix A,
Appendix
• . Appendix C, "Using
and
the
CALC
Chapter and
Chapter variables you can access.
Chapter with examples. Arithmetic and logical operations are supported.
Chapter of described in this chapter. The macro file
AEDIT Chapter
commands required to create an
command formats, and provides a brief explanation
CALC, system.
dependent usage of AEDIT-86 on a Series
5,
"Macro
use macros.
6,
"AEDIT-86
7,
"CALC
8, "Advanced AEDIT-86 Usage," demonstrates the open-ended approach
AEDIT-86. Macros
-86,
is
9, "Configuration Commands," describes and lists the configuration
"AEDIT-86
B,
"AEDIT-86
and macro error messages, their probable causes and how they affect the
command.
Commands," describes commands
Variables," describes the local and global AEDIT-86
Command," describes the
that
enable advanced functions like word processing are
USEFUL.MAC,
listed and discussed.
AEDIT
Command
Error Messages," lists AEDIT-86 invocation, editing,
AEDIT
-86 on the Series
-86 configuration file.
Summary:'
CALC
Ill.
commands-Macro
that
allow you to create
command and illustrates it
that
is
supplied with
lists AEDIT-86 commands and
of
each command.
III,"
describes the system-
and
v
Preface AEDIT -86 User's
Appendix D, "Using AEDIT-86 on the Series IV," describes the system­of
dependent usage
AEDIT-86
Appendix E, "Using AEDIT-86 on of
dependent usage
Appendix F,
AEDIT-86 on
~'Configuring
on a Series IV.
iRMX
iRMX
AEDIT-86 for
Based System," describes the system-
based systems.
Other
Terminals," describes how to configure AEDIT-86 for several terminals and provides tested configurations for specific terminals.
Appendix G,
"ASCII
Codes," lists
ASCII
codes with their hexadecimal values.
Related Publications
Guide
References
to
specific operating systems are given in the appendixes.
Notational Conventions
UPPERCASE
italics
punctuation
.nput
lInes
Characters shown shown.
You may enter the characters
lowercase. Italics indicate variable information, such as filename. Brackets indicate optional arguments The
vertical bar separates options within brackets.
Ellipses indicate that the preceding argument may be repeated.
Punctuation other than ellipses, braces, and brackets must be entered as shown. For example, the punctuation shown in the following command must be entered:
RUN
AEDIT.8S :F1:EXAMPL.SRC
In interactive examples, input lines and user responses are printed
in
output.
white
in
uppercase must be entered
or
parameters.
in
the order
in
uppercase or
or
parameter
MACRO(WORDP.MAC)
on
black to differentiate them from system
vi
< )
Angle brackets indicate a key configured for a function, e.g.,
<HEX>
or
<ESC>.
CONTENTS
PART I
TABLE
OF
CONTENTS
CHAPTER I
PAGE
INTRODUCTION AND TUTORIAL
1.1
Introduction ...................................................................................................................
1.2 AEDIT-86 Tutorial .......................................................................................................
1.2.1 Activating the Editor .................................................................................................
1.2.2 Entering. Changing, and Deleting Text .................................................................... ]-2
1.2.3 Copying Text ..............................................................................................................
1.2.4 Using the
1.2.5 Exiting the Editor ............ ........... ......... ..................... ........ .... .... .................................
OTHER
Command ................................................................................... ]-5
1-1 1-1 1-2
1-4
1-5
CHAPTER 2 THE
EDITOR BASICS
2.1
Keyboard
2.2 Cursor ..... .....
2.3 End-of-File
2.4 Screen-Mode Editing .................................................................................................... 2-2
2.5 AEDIT-86
2.5.1 The Prompt Line ............................................................... ......................................... 2-3
The Menu Prompt ......................................................................................................
The Line-Edited Prompt .............................. ......................... ............. ...... .................. 2-4
The
2.5.2 Message Line ................ ............................................ ......... ..................... .................... 2-5
2.5.3 Text Area .................................................................................................................... 2-6
2.6 Beep Warning ................................................................................................................ 2-6
2.7 Lines and Line Terminators ......................................................................................... 2-6
2.8 Printing and Nonprinting
2.9 Tags ............. ............................... ................................................................................... 2-6
2.10 Repeat Function (Count) ............................................................................................ 2-7
2.11 Buffer ........................................................................................................................... 2-7
..
.......... .... .... .......... .... ...... ...... ........... ..... ........ ..... .................... ....... ....... ..........
...
.... .................... .......... ....... ..... ........... .... .... ............ ............ ........... ....... .... 2-2
Marker
Display/Menu
Yes/No
............. ................................................. .... ........................ ............. 2-2
Format ............................................................................... 2-2
Prompt .................................................................................................. 2-5
Characters
.............................. ............................................. 2-6
2-1
2-3
CHAPTER 3 EDITING
3.1
Cursor Movement Commands ..................................................................................... .
3.1.1 <
3.1.2 <
3.1.3
3.1.4 <
3.1.5
3.2
CARRIAGE
3.3 <
3.4 TAB Function Key ....................................................................................................... .
3.5 Delete Function Keys ................................................................................................... .
3.5.1 <
3.5.2 <
3.5.3 <
3.5.4 <
3.5.5 <
3.6 <
COMMANDS
LEFT) RIGHT)
<UP)
<HOME)
CTRL-C)
UNDO)
...................................................................................................................... .
DOWN)
RUBOUT) DELCH) DELL) DELR) DELLI)
................................................................................................................. .
.............................................................................................................
.............................................................................................................. .
..............................................................................................................
RETURN
Function Key .......................................................................................
............................................................................................................. .
................................................................................................................. .
...............................................................................................................
............................................................................................................... .
Command ...............................................................................................
Command ............................................................................ . 3-3
.......................................................................................................... .
3-1
3-1
..
3-1 3-2 3-2
..
3-2
..
3-3 3-3 3-3 3-3 3-4 3-4
..
3-4 3-4
..
3-4
VII
Table
of
Contents
AEDIT -86 User's Guide
PAGE
J.7
<
HEX)
3.8
INSERT
3.S.1
Description ................................................................................................................. 3-5
3.9
XCHANGE
Description ....... ......... ..... .... ......................................... ............ ..... ........ ..... ........ ......... 3-6
3.9.1
3.10
FIND
3.10.1 Description ...............................................................................................................
3.11
-FIND
3.11.1
Description ............................................................................................................... 3-9
REPLACE
3.12
3.12.1
Description ............................................................................................................... 3-9
3.13
?REPLACE
3.13.1 Description ............................................................................................................... 3-10
3.14
TAG
3.14.1 Description ........................................................ .......................................................
3.15
JUMP
3.15.1 Description ...............................................................................................................
~tag,
Start
Function Key ...................................................................... ................ ......... 3-5
Mode ............................................................................................................. 3-5
Mode ........................................................................................................ 3-6
Command .........................................................................................................
Command ............................
~:..........................................................................
Command ................................................................................................ 3-9
Command ............................................................................................... 3-10
Command ...........................................................................................................
Command ........................................................................................................
B_tag, C_tag, D_tag ............................. ....................................................... 3-12
.......................................................................................................................... 3-12
3-S 3-S 3-9
3-11 3-11 3-11 3-11
End ............................................................................................................................ 3-12
Line ........................................................................................................................... 3-12
Position .............................................................. ......................................... .............. 3-12
BLOCK Command ..................................................................................................... 3-12
3.16
Block Buffer ............................................................................................................. 3-13
3.16.1
3.16.2
Description ............................................................................................................... 3-13
Buffer ........................................................................................................................ 3-13
Delete ............................................. ............................................................. .............. 3-14
Find ........................................................................................................................... 3-14
-find ...........................................................................................................................
Jump
......................................................................................................................... 3-14
3-]4
Put ............................................................................................................................. 3-14
3.17
DELETE
3.1S
GET
3.]
8.1
Description ............................................................................................................... 3-15
VIEW Command ........................................................................................................ 3-15
3.19
3.20
OTHER
Description ................... ............. ................ ........... .... ......... ..... ..... ............... .............. 3-16
3.20.]
3.21
AGAIN
3.22
SET
3.22.1
Description ............................................................................................................... 3-17
Command ................................................................................................... 3-14
Command ........................................................................................................... 3-15
Command ..................................................................................................... 3-15
Command ..................................................................................................... 3-16
Command ............................................................................................................ 3-16
Autonl ....................................................................................................................... 3-17
BaLfile
.................................................................................
,.
........ ................ .......... 3-17
Case .......................................................................................................................... 3-17
Display .................................................................................... .................................. 3-18
E_delimit
..
....... .................. ..................... ..... .............. ............................. .... .............. 3-18
Go ............................................................................................................................. 3-19
Highbit ...................................................................................................................... 3-19
Indent ........ ............ ........ ..... ................ ............ ................. ........ ........ ....... .......... ......... 3-19
Ltoken Leftcol
.................................................................................................................... 3-20
..
.... ....... ..... ....... ...... .... ......... ... ..... ........ ................................................. ......... 3-20
Margin ...................................................................................................................... 3-20
Notab
Radix ........................................................................................................................
........................................................................................................................
3-21 3-21
Showfind ................... ......... ........................................ ..................... ..... ..................... 3-21
Tabs .......................................................................................................................... 3-22
Viewrow ....... ...................................... ................. ............... ............... ........................ 3-22
HEX
3.23
Command .......................................................................................................... 3-23
viii
AEDIT -86 User's Guide Table
PAGE
3.23.1 Description ...............................................................................................................
Input .........................................................................................................................
Output ................... ............................................. ......... .............................................
3.23.2 Examples ..................................................................... ............................................. 3-24
Example]
Example 2 ........................................................................ ..... .... ...... ..... ............. ........ 3-24
3.24
QUIT
3.24.1 Filename Specified ........ ..........
Abort ......................................................................................................................... 3-24
Exit ...........................................................................................................................
Init ............................................................................................................................
Update ......................................................................................................................
Write .........................................................................................................................
3.24.2 Filename Not Specified .................. ............................ ................................. ............ 3-26
3.25
PARAGRAPH Command .......................................................................................... 3-26
3.25.1 Description ......................................................... ...................................................... 3-26
Fill ............................................................................................................................. 3-26
Justify .......................................................................................................................
3.26 WINDOW Command .................................................................................................
3.27 KILL_
3.28 CALC Command ............... ............................................ .............................................
3.28.1 Description ...................... .........................................................................................
3.29 EXECUTE Command ......... .......................................... ........ ..................................... 3-28
3.29.1 Description ...............................................................................................................
3.30 MACRO Command ....................................................................................................
3.30.1 Description .................................................................. .............................................
......................................................... ............... ......................................... 3-24
Command ............................................................ ..... ....... ................................. 3-24
...
...................................... ............... ......................... 3-24
WND
Command ................................................ .............................................
3-23 3-23 3-23
3-25 3-25 3-25 3-25
3-27 3-27 3-27 3-28 3-28
3-28 3-28 3-28
of
Contents
CHAPTER 4 AEDIT-86
4.1
Invocation ......................................................................................................................
4.1.1 Invocation Line Examples ......................................................................................... 4-]
4.2 Invocation Controls .................................... ...................................................................
4.2.1 FOR W ARDONL Y ............. ............................... ... ..................................................... 4-4
4.2.2 VIEWONL Y ..............................................................................................................
4.2.3 RECOVER .................................................................................................................
4.2.4 MACRO ................................................................... ..... .............................................
4.2.5
4.2.6 BATCH ...................................................................................................................... 4-9
4.3 Various BATCH Modes ...............................................................................................
4.4 Banner ............................................................................................................................
4.5 Work Files .....................................................................................................................
PART
INVOCATION
4-1
Example 1 ... .......... ..... ....................... ............... ...... ........ ......... ...... ..... .......
Example 2 .... .... ..... ................ ............ ............... ......... ..... ....... ........ .... ................ .......... 4-]
Example 3 ................................................................................................................
MACROSIZE
............................................................................................................
...
....... ........ 4-]
,..
4-2 4-2
4-5 4-6 4-7 4-8
4-11 4-11 4-11
II
CHAPTERS MACRO COMMANDS
5.1
MACRO Command ......................................................................................................
5.1.1
Description .................................................................................................................
Create .........................................................................................................................
Get ..............................................................................................................................
Insert ...........................................................................................................................
List ..............................................................................................................................
Save ............................................................................................................................
S.2 Deleting Macros ............................................................................................................
5-1 5-1 5-1 5-2 5-3 5-4 5-4 5-4
ix
Table
of
Contents
AEDIT -86 User's
PAGE
5.3 Macro Modes ................................................................................................................
5.4 EXECUTE Command ..................................................................................................
5.4.1
Description ......................................... .......... ..............................................................
5.5 Macros and AEDIT-86 Variables ................................................................................
5.6 Single-Character Macros .............................................. ........... .....................................
5.7 Macro Files ..... ..........
5.8 Macro Execution after a Failure ..................................................................................
5.9 Screen Display during Macro Execution .....................................................................
5.9.1
Text .............................................................................................................................
5.9.2 Message ...................................................................................................................... 5-10
5.9.3 Prompt ........................................................................................................................ 5-10
5.9.4 Windo\\' ....................................................................................................................... 5-10
5.10
Macro Examples
5.10.1
Example)
Example 2 ................................................................................................................. 5-1]
5.10.2
5.10.3 Example 3 .................................................................................................................
5.10.4 Example 4 ................................................................................................................. 5-12
...
..... ..... ....... ...... ..... ........... ..... ..... ........ ...... ..........
..
... ........................................... ................
................................................................................................................. 5-10
...
..... ..........
...
..... .................
...
................ .... 5-10
5-5 5-5 5-6 5-6 5-6 5-7 5-8 5-9 5-9
5-11
CHAPTER 6
AEDIT-86 VARIABLES
6.1
Global Variables ............................................................................................................
6.1.1
Global Numeric Variables .........................................................................................
6.1.2 Global String Variables ............................................................................................. 6-2
Read-Write String Variables .....................................................................................
Read-Only String Variables .......................................................................................
Using String Variables ............................................................................................... 6-2
6.2 Local Variables .............................................................................................................
6.3 Usage and Interpretation of Global Variables
6.4 Summary of AEDIT-86 Variables ...............................................................................
6.4.1
Read-Only Variables ..................................................................................................
6.4.2 Local Variables ..........................................................................................................
in
Macros ...........................................
6-] 6-1
6-2 6-2
6-3 6-5 6-5 6-5 6-6
Guide
CHAPTER 7 CALC COMMAND
7.1
Introduction ...................................................................................................................
7.2 Syntax Diagrams for CALC Statement .......................................................................
7.3
Numeric Constants .......................................................................................................
7.4 String Constants ............................................................................................................
7.5 Operators .......................................................................................................................
7.5.1
Shift/Rotate Operators ..............................................................................................
7.6 Expression Evaluation ...................................................................................................
7.7 Examples .......................................................................................................................
7.7.1
Example 1 ...................................................................................................................
7.7.2 Example 2 ...................................................................................................................
7.8 Errors ............................................................................ .................................................
CHAPTER 8 ADVANCED AEDIT-86
8.1
USEFUL.MAC .............................................................................................................
8.2 Tips for Writing Macros ...............................................................................................
8.2.1
Send Text
8.2.2 Simulate
8.2.3 Simulate
8.2.4 Simulate
8.2.5 Simulate "Advance_While
8.3 Examples ................................................................. ........ ........ ......................................
8.3.1
Example 1 ...................................................................................................................
8.3.2 Example 2 ............................................................................. ......................................
8.3.3 Example 3 ............................................................................. ......................................
to
the Message Line .................................................................................
"IF
cond
"IF
cond
"IF
cond THEN statement1 ELSE statement2" ......................................
USAGE
THEN
RETURN" (to the caller) .............................................
THEN
statemenf' ......................................................................
cond'
.............................................................................
7-1 7-1 7-3 7-3 7-4 7-4 7-5 7-5 7-5 7-5
7-5
8-1 8-2 8-2 8-4 8-4 8-4 8-4 8-5 8-5 8-6 8-6
x
AEDIT
-86
User's
Guide
Table
of
Contents
CHAPTER
9
PAGE
CONFIGURATION COMMANDS
9.1
Introduction ...................................................................................................................
9.1.1 Configuration Command Notes ................................................................................. 9-4
9.2 Configuration Values .................................................................................................... 9-4
9.3 Delay Codes .................................................................................................................. 9-6
9.4 Determining the Configuration Values ........................................................................
9-1
9-7
APPENDIX A AEDIT-86
A.I Function Keys .............................................................................................................. A-I
A.2 AEDIT-86 Editing Commands ................................................................................... A-2
A.3 AEDIT-86 Advanced Commands .............................................................................. A-6
COMMAND SUMMARY
APPENDIX B AEDIT-86
B.l Invocation Errors ..........................................................................................................
B.2 Editing Command Errors .............................................................................................
B.3
CALC
B.4
Macro
ERROR MESSAGES
Command Errors ..............................................................................................
File Errors .........................................................................................................
B-1 B-1 B-3 B-3
APPENDIX C USING AEDIT-86 ON
C.I
Invocation Command ................................................................................................... C-I
C.2
Terminals Used with the Series
C.3
Integrated Series III Terminal .................................................................................... C-I
C.3.1 Configuration Commands ......................................................................................... C-I
C.3.2 Scrolling ..................................................................................................................... C-I
C.4
Integrated Series
C.4.1 Configuration Commands ......................................................................................... C-2
C.4.2 Using Serial Channels with the Integrated Series
C.S Work File ...................................................................................................................... C-2
C.6
Related Publications .................................................................................................... C-2
THE
SERIES III
III
System ................................................................ C-I
IIIE
Terminal .................................................................................. C-I
IIIE
Terminal.......................... C-2
APPENDIX D USING AEDIT-86 ON
0.1
Invocation Command .................................................................................................. D-I
D.2 Keyboard ................... ............................ .............................................................. ........
0.2.1
Soft Keys .................................................................................................................. D-I
0.3
Message Line ........................................ ....................................................................... D-2
0.4
Scrolling ............................................................................................................... ........ D-2
O.S Printing and Nonprinting Characters ......................................................................... D-2
0.6
Configuration Commands ........................................................................................... D-2
0.7
Default Macro File .....................................................................................................
0.8
Using Series IV with Remote Terminals ................................................................... D-2
0.9
Work File ..................................................................................................................... D-3
0.10
Related Publications ................................................................................................. D-3
THE
SERIES
IV
D-1
D-2
APPENDIX E USING AEDIT-86 ON
E.I
Invocation Command ...................................................................................................
E.2
Special Considerations ................................... ........................ ................ ........ ....... .......
E.3 Default Macro File ................................................................................... ...... ........ ......
E.4 Work File .... ........... ...................... ................... ......................... .............................. ....... E-I
THE
iRMXlM-Based
System
E-1 E-1 E-1
xi
Table
of
Contents
AEDIT -86 User's Guide
APPENDIXF CONFIGURING AEDIT-86 FOR OTHER
F.! Tested Configurations ...................................................................................................
1510E.MAC-Hazeltine™ 1510 .....................................................................................
1510T.MAC-Hazeltine™ 1510 .....................................................................................
ADM3A.MAC-Lear
MICROB.MAC-Beehive™ Mini-Bee ...........................................................................
QVTI02.MAC-Qume™ S3.MAC-Series S3E.MAC-Series S3ET.MAC-Series S4.MAC-Series
TV910P.MAC-Televideo™ 910 Plus ............................................................................
TV92S.MAC­VIEW3A.MAC-ADDSTM Viewpoint
VT100.MAC-DECTM VTl 00 ........................................................................................
VT52.MAC-DECTM VT52 ............................................................................................
ZENTEC.MAC-Zentec™
Siegler™ ADM3A ......................................................................
QVTI02 .................................................................................
III with Integrated Series III Terminal............................................
III with Integrated Series IIIE Terminal.......................................
III as Terminal to Remote Host ...................................................
IV
Terminal ........................................................................................
Televideo
TM
925 and 950 ........................................................................
3A
Plus ..............................................................
Zepher and Cobra .............................................................
TERMINAlS
APPENDIXG ASCII CODES
INDEX
FIGURES
PAGE
F-I F-2 F-3 F-3 F-4 F-4 F-4 F-4 F-4 F-S F-S
F-S F-5 F-6 F-6 F-7
FIGURE TITLE
2-1 2-2
AEDIT Display ....................................................................................................
Menu Prompt Lines .............................................................................................
TABLES
TABLE
4-1
7-1 9-1 9-2
F-I
AEDIT-86 Invocation Controls Operators'
Configuration Commands ................................................................................... .
Configuration Values .......................................................................................... .
Switch Settings ........................................... : ........................................................ .
Precedence and Associativity ..........................................................
TITLE
PAGE
PAGE
..
F-2
2-3 2-4
4-2
7-3 9-2 9-5
xii
Part
I includes Chapters 1 through describes the basics required commands are described in
mentioned briefly here, then fully described presented before going on to
to
Part
Part
4.
It
gives a general overview
use
AEDIT-86, including a tutoria1.
I,
most
II.
of
AEDIT-86 and
An
of
them in depth. However, some
in
Part
II. Read
Part
I in the order
AEDIT-86
are
it
is
PART I
Chapter tutorial. text; some function keys; the main and the
Chapter ing the keyboard, the cursor, the end-of-file marker, screen-mode editing, display and menu format, beep warning, lines and line terminators, printing and nonprinting characters, tags, repeat function, and AEDIT-86's three buffers.
Chapter and function keys.
Chapter FORWARDONLY, BATCH.
1,
~'Introduction
It
describes activating the editor; entering, changing, deleting, and copying
2,
"The
Editor Basics," describes several basic AEDIT-86 features, includ-
3,
"Editing
4,
"AEDIT
and Tutorial," introduces AEDIT-86 and gives a short
OTHER
Commands," describes AEDIT-86's editing modes, commands,
Invocation," describes AEDIT-86 invocation and the controls
VIEWONLY,
RECOVER,
files; and exiting the editor.
MACRO,
MACROSIZE,
and
i
·
n
~
1. 1 Introduction
INTRODUCTION
CHAPTER 1
AND
TUTORIAL
AEDIT-86
prompts. Series IV on
the
of
96 Kbytes
significantly.
AEDIT
Display
Move
Rewrite text by typing new
Make
Use
To
simplify text editing,
Find
Substitute
Move
Create tive editing tasks
Use
Edit
Format
Justify
View lines over
Use
is
an
interactive, screen-oriented text editor with menu style
AEDIT-86
and
iRMX
different systems
of
-86
takes
and
to
any
insertions and deletions easily
windowing
any
string
or
copy sections
macros
arithmetic
two files simultaneously
text automatically
paragraphs
basic word processing operations
can be run within several environments including Series Operating System. Specific information on running
is
given in
free
RAM.
advantage
scroll text on the screen
position
to
of
one string of
to
functions
80
Additional free
of
in
the text file or to any point on the screen
view two files or two portions
AEDIT
characters
characters
of
execute several commands at once, thereby simplifying repeti-
characters
the
appendixes.
RAM
improves
CRT
capabilities to allow you to:
characters
-86 also provides features
text
in
long
over old ones
for
another
a file or
to
another
AEDIT-86
AEDIT-86
of
the same file simultaneously
string
file
requires a
AEDIT-86's
that
allow you to:
performance
command
III,
minimum
1.2 AEDIT -86 Tutorial
This
session
The
following functions are covered:
Activating the
Entering
Changing
Deleting
Copying text
Using the
Exiting the The
purpose commands. tutorial. commands, read
is
a short tutorial
text
text
text
OTHER
editor
of
this tutorial
Only
a few
For
more
Chapters
editor
Command
of
complete
is
the most basic
I through 4.
that
illustrates the most basic
to
get you
information
started.
AEDIT-86
on
AEDIT-86
AEDIT
not to fully document
commands are presented in this
features.
86 commands.
AEDIT-86
concepts
and
1-1
Introduction and Tutorial
AEDIT -86 User's Guide
This manual makes
give operating-system dependent information.
1.2.1 Activating
Specific invocation commands are given
In general, AEDIT-86 is activated
':'EDIT
The editor displays the following prompt
- ? ? - system-id A E D I T V
Again
The question marks
"waiting" for your input. When AEDIT-86
by two exclamation points (-!!-). system-id
x.y
bar
(EOF).
the top left corner of the display area. As you type text into the file, the vertical bar
moves and continues to mark the end of the
marker. (The term cursor refers to the position indicator. The way
is
displayed-solid,
<RETURN>
Block
is the
AEDIT
(I) (initially in the upper left corner
Because the new file
no
references to any particular operating system; the appendixes
the
Editor
in
the appendixes.
by
typing the following:
at
the bottom
x.y
Cop y
rig
Calc
(-??-)
-86 version number, and yyyy
non-blinking block, underline,
Delete
in
front of the system-id indicate
is
"busy," the question marks are replaced
is
a string identifying the operating system,
of
the screen) marks the end
you
just created has
file.
h t yyyy I n
Execute
is
of
the screen:
tel
Cor
Find
the copyright year(s). The vertical no
text, the vertical
The cursor initially covers the
etc.-is
terminal dependent.)
-find
that
AEDIT-86
bar
in
which the cursor
p .
of
the file
appears at
EOF
--more--
is
When first invoked, AEDIT-86
menu prompt line offers a selection
INSERT
subcommands. You must be at main command when using cursor movement commands and the delete keys. AEDIT-86 does not return automatically to main command level after executing some commands (e.g.,
FIND).
modes, press
Throughout the manual,' main commands and modes are written in uppercase to distinguish them from subcommands, which are written QUIT
To
specify a menu selection (i.e., command or mode), press the initial letter
s~lectio~{e.g.,
The word --more-- on the prompt line indicates that there are more commands or modes. Press ( display additional prompts displayed, the first
1.2.2
Before typing text into the file, you must press I to enter [insert] mode. Type a word but misspell it.
time you press <
character. When the erroneous character(s)
are considered modes). When invoked, several main commands offer
To return to the main command level
(ESC).
Exit. Function keys are enclosed
B for BLOCK).
TAB)
to display the next line of prompts. Pressing (
is
redisplayed).
Entering, Changing, and Deleting
is
displayed at the bottom of the screen, indicating that you are
RUBOUT),
is
at main command level waiting for your input. The
of
main commands or modes
level
to execute commands, except
or
to exit
in
angle brackets; e.g.,
is
a cyclic operation (Le., after the last prompt line
INSERT
(XCHANGE
or
XCHANGE
in
upper jlowercase; e.g.,
(ESC),
(HEX).
TAB)
Text
INSERT
To
correct the error, press
the cursor backs up one column and erases the
is
erased, type the correct character(s).
mode.
The
in
(RUBOUT).
and
of
the
to
is
word
INSERT
Each
1-2
AEDIT -86 User's Guide
The
line you
key
or configured marker remains in
just
in
its.entirety
to
is
back
the
typed
may
with
(CTRL-Z».
in
the
upper
same
position on
be deleted character-by-character with
the
key configured
Delete the line.
left-hand corner
tbe
screen until the next command is given.
to < DELLI
The
file
is
of
the screen.
),
now empty, and
The
Introduction
the < RUBOUT)
delete line (usually
the
EOF
cursor, however,
aad Tutorial
Now type
the
following sentence.
Enter
the text exactly as
shown-several
deliberately misspelled.
The
first word
cursor
control keys
the
cursor control keys (arrows), in the direction indicated by the arrow. (There-
by fore, press the up arrow ( press the left arrow used in conjunction with the cursor nine times
<
DELCH
I.
extra The
s in Pascal has been omitted.
in Pascal
<
Press The
ESC)
word
XCHANGE The word [exchange]
in
XCHANGE
in
the
sentence, levell,
to
position the cursor
<
UP
) ) twice to move the cursor to the first line. Then
<
LEFT)
the
cursor control keys for fast cursor
to
the first position
to
position the cursor ··on" the first
) , delete
and
type
model
to
s.
leave
is
character
Text
INSERT
misspelled
in
(usually configured to <
automatically moves to the right as the s is inserted.
is
misspelled. To correct this error, use the
"over"
followed by <
the erroneous
HOME)
the line. Now press the right arrow <
I.)
To
correct this error, position the cursor on the c
mode and return to main command level.
modal.
To
correct
mode.
is
displayed
at
the bottom of the screen, indicating
mode. Position the cursor ··over" the a and type
I.
The
-the < HOME) movement-to
Then press the key configured to
CTRL-F)
the
error,
type X to
e.
words
are
cursor
is
moved
key
move
RIGHT)
) to delete the
enter
that
you are
is
Press <
ESC)
to leave
XCHANGE
mode and return to main command level.
You have learned how to insert text, exchange text,
the
Now type cursor below the lines you the right arrow key ( twice
and < RETURN)
at
the beginning
and
-_S
.
'e
-"-5.at.:-
Press < Note
that
I
of
the
<
with gured
DELR
to < CTRL-A ) ).
following sentence exactly as shown. First, type I. Then, position the
just
typed. Move the cursor to
<
".g"-:evf.
:ha~
ESC)
the
word less
RIGHT)
of
an empty line. Type the following lines exactly as shown:
la~guages
.=,,-:e~el
5~e~
to leave
15
INSERT
is
once.
) followed by <
The
cursor
,a~gJajes
reql...red
are
-ro'"
HOME),
is
now positioned
eas.er
5.~ce
co~ce;:t
mode and return to main command level.
typed twice.
To
correct this
the second less. Because it appears at the end
) . Press
the
key configured to <
The < DELR)
DELR
command deletes all text to the right
cursor.
the
phrase
from
Suppose you wish to delete the period at section from
the the
end
rest
of
the sentence.
of
the text using the
To
concept to code from the text, leaving
do this, you must ··block" (i.e., delimit) this
BLOCK
subcommand.
and
delete individual characters.
the
end
of
the line using
then press <
at
the end
and
faster
Dre
:es5
to
error
of
the line, it may be deleted
leS5
code.(RETJRN)
position the cursor on
to
DOWN)
of
(RETURN)
<RET"RN)
) , delete right (usually confi-
command followed
by
the Delete
the file
of
the
1-3
latroductioa
.ad
Tatorial
AEDIT -86
User's
Guide
First, position the cursor over the first character
the
period to close the sentence, so position the cursor
of
the section. In this case
on
the space before the f
you
want
in
from.· Then press B for BLOCK. The @ sign covers the space. Then position the
cursor one character past the end of the section cursor
on
the period immediately after the e
the
menu displayed several alternative subcommands: Buffer, Delete, Find, -find,
Jump, and
To
delete
The is as follows:
High-level closely
languages Thus, write translation
For faster cursor movement, use the (­above, to move the cursor to the word position name of the target string. Type
h
in
the
4'target string" followed by <
terminate the
Put.
the
phrase, press 0 for Delete.
phrase
is
deleted from the text and the space
languages
model
such
the
as
high-level
than
is
at
low-level
the end
step
i5
of
the file), press the hyphen (-). AEDIT-86 prompts for the
human. To move forward
-FIND
command.
(Pascal
human
assembly
languages
languages,
required.
human and press <
in
the file with the
ESC).
in
thought
)FIND
human (assuming that the current cursor
you
wish to block; i.e., place the
code. When
is
closed automatically. The result
in
particular)
process language. are
easier
since
or
JUMP
ESC)
FIND
command, press F, then type
Note that <
you
pressed B for BLOCK,
more
than
and one
command. In the example
. The cursor moves to the
ESC)
must be pressed to
faster
le55
low-level
to
To
jump to the beginning or the end of the file, simply press J for
S for
Start
or E for End.
1.2.3
Use the BLOCK command to copy existing text. to B to specify the Buffer subcommand. The text
position the cursor where you want the text to appear and press G, the GET command. This command prompts for an input file. of cursor position.
To
position, delimit the text using the BLOCK command and press 0 to specify the
Delete subcommand. The text where you want the text to appear and press G, the prompts for an input file. current cursor position. Note by either the Buffer or Delete subcommand under the BLOCK command.
To and press Type in the filename and press already exists, the message 4'overwrite existing file? (y or is copied only
and the text
Copying
another part
the buffer (where the text had been held temporarily) and places it at the current
move a section
copy a section of text to another file, delimit the text using the BLOCK command
P to specify the
Text
If
you
want to copy a section of text
of
your file, delimit the text using the BLOCK command and press
is
held temporarily
of
text to another part of your file and delete it from its present
is
held temporarily in a buffer. Then, position the cursor
Press <
Put
RETURN)
that
copying or deleting a section of text
subcommand. The menu prompts for an output file.
<
if
you respond with y.
is
copied to the specified file.
Pressing <
ESC)
or < RETURN).
If
the specified file does not exist, it
RETURN)
GET
to place the buffer contents at the
[n])"
JUMP
"gets" the contents
command. The command
If
is displayed. The file
followed by
in
a buffer. Then,
is
controlled
the specified file
is
created,
1-4
AEDIT
-86 User's Guide Introduction and Tutorial
1.2.4 Using the
AEDIT-86 The
OTHER two editing files. enter command
has two distinct and equivalent files:
the
OTHER
is
fully described
1.2.5 Exiting
To
exit from the editor, press Q for
The
following prompt appears:
-??-
Abort
Three (lnit
If
no
input
alternative subcommands
is
described
you do not want to save
OTHER
file increases the power
To
enter
the
file. Press 0 a second time to return to the main file.
the
Editor
file
Init
in
Chapter
session.
The
following prompt
ell
changes
is
lost?
displayed:
Command
OTHER
in
Chapter
W r i t e
are
3).
the
contents
(y
the
of
AEDIT-86,
file, use
main file allowing you to switch between
the
OTHER
and
the
OTHER
command. Press a
The
OTHER
file.
3.
QUIT.
available. A aborts the session; W saves the file
of
this practice session. press A to abort the
or
[n])
to
Press y.
The
editor exits, and the file
is
system.
If
you want to save this file, press
Out
put
f i 1 e :
Type
in
a filename (e.g.,
MYFILE)
W.
The
and press <
specified file to the main storage device.
not saved. Control returns to the operating
following prompt
RETURN).
is
displayed:
The
editor writes the
)-5
CHAPTER 2
The
following editor basics
Keyboard Cursor
End-of-file
Screen-mode editing
AEDIT-86 display and menu format
Beep warning
Lines and line terminators
Printing and
Tags
Repeat function (count)
Buffer
(EOF)
non
are
described
marker
printing characters
in
this chapter:
2. 1 Keyboard
The
keyboard
keyboard that supports the ASCI I character set.
is
your interface with the editor.
THE
It
is
a typewriter style. electronic
EDITOR BASICS
Every keyboard character can be considered a command because every something to happen. Most keys are self-explanatory. Some, however, are configured to
perform functions rather than enter characters. These keys
keys; their names are enclosed
ARROWS
CAPS
CONTROL
LOCK
or
TPWR
<CTRL)
<ESC)
<HOME)
<RETURN)
The
control keys <
The case entry alphabetic keys only.
The keys on the keyboard. (For example, to change the function of X, hold down the <
The < ESC) and returns the editor to main command level.
The < HOME) arrow key followed through a file line. <
edit prompts. The < RETURN)
next line command level. search commands return/line feed character
in
angle brackets throughout this manual.
four keys labeled with directional arrows are the cursor
LEFT), < RIGHT). < UP ) ,and < DOWN)
CAPS LOCK or
of
alphabetic characters. This key functions with the
CONTROL
(escape) key exits modes. terminates commands,
or
HOME)
in
INSERT
TPWR
( <
CTRL)
CTRL)
key allows faster cursor movement. Press an
by < HOME)
to move rapidly
is also used to enter the reedit mode for line-
key moves the cursor
It
also terminates line-edit prompt except for the
(-)FIND
key provides uppercase or lower-
) key changes the function of some
key and press X).
to page backward or forward
to
and
XCHANGE
and
(?)REPLACE.
is
displayed
the beginning or end
are
to
the beginning
modes and at main
in
text as a blank.
key
causes
called function
of
of
the
The carriage
.
a
2-1
De
Editor Basics
AEDIT
-8()
User's Guide
cRUBOUT)
<TAB)
2.2
Cursor
The
cursor indicates the entry point for all information. The cursor may be displayed as a solid nonblinking block, as an underline, as a solid blinking block, etc., depending on your terminal.
The
term cursor refers both to the cursor displayed and to the current file location (the character The
physical and logical cursor diverge only when the physical cursor leaves the text
area for prompt lines (for example, to enter a search command) or when the <
or < DOWN)
When the cursor and <
DOWN)
cursor back to the end The
actual cursor position
the
character
BLOCK, <
the character under the physical cursor. Some commands (e.g.,
c
DELCH
position; otl)er commands (e.g., <
ately to the left
DELL),
) ) operate on the character immediately to the right
The
RUBOUT
at main command level
<
RUBOUT)
with the original character. The
TAB key rotates the menu prompt line to display the next
line
of
commands. In
inserts blanks to the next defined tab stop (the default
fourth column).
command moves the cursor to a screen location past the end of a line.
is
located past the end
commands (including <
of
the line, before execution.
is
the space between the character on which it appears and
immediately to the left. Thus, for some commands (e.g.,
< DELR )
of
the actual cursor position.
key deletes the character to the left
or
INSERT
replaces the
),
characters are inserted (or deleted) directly before
RUBOUT)
new
INSERT
"under"
of
a line, all commands except the <
TAB)
) operate
mode. In
character to the left
or
XCHANGE
on
the screen (the physical cursor)
the cursor, or logical cursor).
or an illegal command) move the
on
the character immedi-
of
the cursor
XCHANGE
of
the cursor
modes, <
XCHANGE
of
the actual cursor
TAB)
is
INSERT,
mode,
UP UP
every
and
) )
2.3
End-of-File Marker
The
end-of-file
the
end
of
last character
2.4
Screen-Mode Editing
AEDIT as you make them. You can move through your file making changes, insertions, and deletions, verifying them as you text you want to change, change it, and review the next screenful of text. A portion of
2.5
AEDIT-86 requires a column display screen (columns are numbered from 0 to 79). The cursor ence point for all operations, e.g., INSERT, FIND, DELETE, REPLACE. The screen
is divided into the following three sections (listed from bottom up):
Message line
Text area
-86's greatest advantage
text
is
AEDIT-86 Display/Menu Format
Prompt
(EOF)
a file
of
always displayed
line
marker
is
on
the screen, the
the file.
CRT
is
a vertical bar (I)
EOF
is
its ability to display and verify changes to the text
go.
You can examine a screenful
on
the screen.
terminal (or a
that
indicates the end
marker
is
displayed immediately after the
of
CRT
section) with at least a 5-line, 80-
of
a file.
If
text, locate the
is
the refer-
2-2
AEDIT -86 User's Gaide
The Editor Basics
Figure
2-1
shows
the
screen after AEDIT-86
is
called but before any text has been
typed.
2.5. 1 The Prompt Line
The
prompt line
line is blank.) The prompt line contains information on
subcommands
Menu
Line-edited prompts
Yes/no
The Menu Prompt
When AEDIT-86 is first invoked, the editor is at main command level and the menu prompt is displayed. Menu prompts are a partial list available commands. The word --more-- indicates the next line line is displayed the first available
To
at
select the desired command, type the first character of the prompt word (indicated as an uppercase letter). invoke
it-it
line goes blank at the beginning
is
the
bottom line of the display. (The first position
that
you may perform. The three types of prompts are
prompts
prompts
of
prompts. The <
is
main command level.
The
may be on one
of
the prompt
the
TAB)
command
options
of
up to eight words indicating
that
pressing <
is
cyclic (i.e., after the last prompt
of
commands
TAB)
or
displays
redisplayed). Figure 2-2 shows the four prompt lines
prompt for a command does not have to be visible to
of
the prompt lines indicated by --more--. The prompt
of
the command operation and is restored
at
the end.
MESSAGE
PROMPT
LINE
LINE
~=~.-
...
A 9 • i n
, , -
Iyste.-id
Block
Figure
AEDIT V Calc
2-1.
•.
y
Delete
AEDIT -86 Display
Copyright
[Iecule
yyyy
Find
Intel
·fll.d
Corp.
--.ore--
121756·1
2-3
TIle
Editor
Basics AEDIT -86
·flnd
-
.,
, -
Get
-""-
Paragraph
Bloc'
Hel
Qult
Calc
Illserl
Replace
Delete
Ju.p
'replace
Elecute
Kill.wnd
Set
find
"aero
Tag
Other
View
--.ore--
·-.ore--
--.ore--
User's
Guide
,;
....
1-"-
The Line-Edited Prompt
Line-edited prompts ask for information (such as a filename) that requires more than a single-character user response. The response can be up to nated and the information sent may also be used to terminate a command. However, the search commands, (­and
(?)REPLACE,
The first time a command
the required information.
If
the command (or a related command) has been requested previously, the prompt
line contains the information entered at
or edited,
If
you want to use the previously entered information with no changes; e.g., to repeat
a
FIND,
press <
lchang!!
. Figure
must be terminated with the <
is
or
new information may
ESC)
and this information will
2-2.
Menu Prompt Lines 121756·2
by
pressing <
requested, the prompt line
be
entered.
ESC)
ESC)
that
time. This information may be reentered
be
--.,
..
--
60 characters.
. In most cases <
key.
is
empty and you simply enter
reentered.
It
RETURN)
~
is
termi·
)FIND
2-4
<
To edit the previously entered information, press The cursor may now be moved to the position you want to edit, e.g., to correct a typing error
<
DELL),
( <
LEFT), < RIGHT), < HOME)
ing the changes, press < string or press key must be used for the search commands, characters to the left
in
a target-string. The delete key commands ( <
<
DELR
<
), < RUBOUT»,
) are legal line-edit commands. After enter·
ESC)
RETURN)
of
the cursor are sent, those to the right
to terminate line-edited input and send the entire
to terminate the string
HOME)
and
cursor
(·)FIND
at
to enter reedit mode.
DELCH
movement
the cursor. (The <
and
), < DELLI),
commands
(?)REPLACE.)
of
the cursor are lost.
ESC)
The
AEDIT -86 User·s Guide
If
you want (except blanked
the
finish
To
enter a character
<
HEX) For
example.
characters
The
Yes/No
The
yes/no
the
default.
all
to
enter
new information. simply type it in. As soon as
for
(1...EFT). < RIGHT). < HOME) . or
and
the
nev."
command
(usually configured
(e.g
prompt as
changes
(HEX)
.. < ESC)
Prompt
in
the
lost?
and
form
characters
send
using its
41
) into the text.
is
following example:
are entered. Press <
the
information.
ASCII
as
enters
"prompt?
(y
value
(CTRL-H
an
A. This option allows you
(y
0 r
[n])
any
key is pressed (ESC»). ESC)
in
the
line-edit prompt. simply type
) ) followed by t"'O hexadecimal digits.
or
[n]
r'.
where
square
the
or <
brackets
prompt
RETURN)
to
enter
surround
The Editor Basics
line
is
to
control
In this case. n a negative response. than n (or
2.5.2
The
message line
or
to indicate
The
busy a relatively long still processing a configurable displayed
-??-
-!!-
- indicates
If
the
busy/waiting waiting answer. displayed. Later
on
is
the
N)
is
considered a positive response.)
Message Line
is
directly above the prompt line.
the
command
Jwaiting
as
-indicates
-indicates
for input. an
operand,
If
in
indicator
time
the
command,
feature
one
of
the
uration
the
nonactive window.
The
the
busy/waiting
this
manual
default: therefore. any response other than y
(In a yes/no
to execute.
(described
following:
that
the feature
that
the
that
the feature has been
command
indicator feature is on, -??-
expected input
etc. Also. whenever
the
prompt
mode.
is
displayed on
the
busy/waiting
or
if
it is
in
Chapter
is
feature
or
indicator feature
busy
is
that
the
may
/waiting
where
.r
is
It
is
the
message line.
indicator tells you
ready
to receive new input.
9).
The
on
and
AEDIT-86
on
and
AEDIT-86
turned
feature
be a command, a
AEDIT-86
indicator
is
is
displayed whenever
is
is
off. ----
is
the default. any response
used to display
For
busy/waiting
expects input. is executing a
off with
on. but
displayed as four dashes.
the
subcommand. a yes/no
processing a
is
displayed at all times.
(or
Y)
status
commands
if
AEDIT
This
indicator
an
AEDIT-86
message line
AEDIT-86
command.
is
considered
messages
that
indicator
may
command.
config-
other
take
-86
be
is
for
-!!-
is
is is
is
If,
for example, you type
to
-!!-
as
soon
as
AEDIT-86
completes
Next,
View
• This
mode messages,
the
one
of
Macro Other
Forward
part
of
of
the
count
command
the
following
the
message line does not change unless
file is changed.
(repeat
execution.
indicates indicates indicates indicates
function),
JS
for
JUMP
accepts
The
status
words that a macro that
the
OTHER
that
the
VIEWONL
that
the
FOR W ARDONL
Other
messages displayed on
and
Start,
the
command.
indicator
may
be displayed:
is being defined.
file
the
line-edit prompt
and
the
indicator
The
-!!- remains until
is then changed
is
being edited.
Y control is in effect.
Y control
the
OTHER,
the
is
back
is
MACRO.
message line
••
(HOME)
on. it
is
AEDIT-86
to -
in effect.
to
changed
~?-.
or
editing
are
status
re-edit".
2-5
De
Editor Basics AEDIT -86 User's Guide
AEDIT not
When message line goes blank as soon as any key
2.5.3
The
2.6
The editor beeps when you try to do something illegal, for example:
Attempting to execute an illegal command
Typing an invalid character during
Typing more than 60 characters in a line-edited prompt
Entering a repeat count greater than the maximum value
It also beeps when presenting some of the error messages.
-86 does not write past
fit. ! is printed as the last character. .
the
message line contains status information, usually an error message, the
Text
Area
rest of the screen is the text area.
the
last column
Beep Warning
INSERT
of
the message line.
is
pressed.
or
XCHANGE
mode
If
a message does
2.7
.Lines and Line Terminators
A line line feed. This pair when you press
If
column on the screen. The portion of the line that does not fit on the screen displayed. To view the portion (described in Chapter 3).
A line may contain any number of characters. AEDIT-86 breaks lines longer than 255 characters into 255-character segments. A plus sign ( of
2.8
In with hexadecimal values equal to or above characters that are not displayed on the screen print as a question mark return and tab print as blanks. characters with hexadecimal values over 7FH are displayed as
of
text consists
a line
is
over 80 characters long, an exclamation point
each segment.
of
a sequence
of
characters, called the line terminator, is entered
<
RETURN) . (RETURN
that
of
is
characters terminated by a carriage return /
in
the file
is
displayed
not displayed, use the
on
the screen as a blank.)
(!)
is
displayed
SET
Leftcol command
+ )
is
displayed at the end
in
the last
is
not
Printing and Nonprinting Characters
general, all characters except those with ASCII values under 20H and characters
7FH
are displayed
If
the Highbit feature (described
on
the screen. All
in
Chapter
is.
(?).
Carriage
3)
is
set.
2-6
2.9
Tags
Tags identify locations in a file. You can specify four locations, A through the
TAG
command and use them as destinations for the
invisible and are not saved when you exit the file.
JUMP
command. Tags are
D.
with
AEDIT -86 User's Guide
The Editor Basics
2.10
Count command. count. side for count. location when count line contains a count, the count is blanked when the next prompt count attempt
(J)
Repeat Function (Count)
is
displayed on the message line and indicates the
Some
commands ignore count or, like delete
Enter
count before typing a command letter.
of
the message line. <
The
cursor position
is
an optional decimal repetition factor
to type a larger value for count causes AEDIT-86 to beep. A forward slash
is
accepted as a
RUBOUT)
after
is
exhausted or no more occurrences are found. When the message
count
and
means repeat forever. The default count
can
be used to delete
a command has been executed count times
in
the range 0 to 65535 (2**]
number
character < DELCH
It
is
then displayed
the
2.11 Buffer
AEDIT-86 buffer. All three buffers
The
main buffer
file.
The
OTHER
portion
The
buffer
that
is not being edited, as
in
file buffer would be referred to as the secondary buffer.
of
the
has
three
buffer
the
OTH
that
is
OTHER
buffers: the main buffer, the
are
allocated space
is
the
text area
is
accessed with the
ER
file
accessed and active
buffer, it would be referred to as the
at
(if
one exists).
the
"secondary"
startup. It always contains a portion
in
the user's free
OTHER
is
referred to as the
buffer.
OTHER
command and always contains a
For
buffer, and the Block
RAM.
"current"
example,
current
of
times
to
repeat a
),
limit
at
the left
vaJue being entered
is
its
is
issued.
if
buffer, and the main
The
repeat
6-]).
Any
is
one.
of
the main
buffer; the one
you are editing a
If
either
the main or
the
buffer with additional free exhausted, 86's
The BLOCK/DELETE the
main
than
AEDIT-86
performance improves with the amount
Block buffer is
and
the
2 Kbytes
the
OTHER
is
required,
OTHER
writes to temporary files, usually on disk
commands.
buffer
storage area for text
The
file.
The
AEDIT-86
is
too small for the text file,
RAM
if
it
is
available. When all free
of
free
RAM
that
you move, copy,
Block buffer allows you to move text between
Block buffer has a fixed size
uses a temporary file.
AEDIT-86
or
available.
or
of
diskette.
delete, using
2 Kbytes.
extends
RAM
AEDIT-
the
If
more
is
2-7
'.
CHAPTER 3
EDITING COMMANDS
This chapter describes all AEDIT-86 commands. Most of the commands are described in depth. However, some commands are only mentioned here and fully described Part
II.
3. 1 Cursor Movement Commands
The
cursor movement commands control cursor movement
(RIGHT),
<
HOME)
3.
1. 1 (
The
LEFT
(UP),
refers to
and <
the
key labeled
DO\\'N)
(HOME)
LEFT)
command moves the cursor one
refer to keys labeled with directional arrows;
character
(or configured for this function).
to the left.
in
a file.
(LEFT),
in
Special cases
If
If
the cursor
is
rewritten/scrolled to display previous line(s)
is terminal dependent).
If
of
If
Count.
If
count is / or greater
of
the file
The
result
Related Commands. <
3.1.2
The
RIGHT
Special cases
If
the
If
the
scrolls up (usually one line).
If
next line.
If
the
of
(LEFT)
the cursor
the cursor the previous line.
the cursor
This command accepts any count where count multiplies the distance moved.
to
is
on
is
at the top
is
at the beginning
is
moving to a tab,
the current cursor position, the cursor jumps to the beginning
of
a repeated move is not displayed until the move
are-
the first
than
the number
HOME)
character
of
the screen and
(RIGHT)
command moves
of < RIGHT)
cursor is on the
cursor
the
is
cursor
cursor
on the last
is
on
the
is
moving to a tab,
the
cursor one
are-
EOF
marker, the command
character
last
character
of
the file, the command
at
the beginning
of
text (the number
of
a line, the cursor moves to the last
(LEFT)
of
(RIGHT)
skips over the tab.
of
characters
character
the last text line on the screen, the screen
of
a line, it moves to the beginning
that
to the right.
is
ignored.
skips over the tab.
is
ignored.
of
the line, the screen
of
exist from
is
complete.
lines scrolled
character
the
beginning
of
the file.
of
the
Count.
If
current The
Related Commands. <
This command accepts any count where count multiplies the distance moved.
count is / or
cursor position to the end
result
greater
of
a repeated move
than the number
of
the
is
not displayed until the move
HOM
E )
of
characters that exist
file, the cursor jumps to the end
in
the file from the
is
complete.
of
the file.
3-1
Editing Commands
AEDIT -86 User's Guide
3.1.3
The
Special cases
Count.
If
file
result
Related Commands.
3.1.4
The
Special cases of
(UP)
UP
command moves the cursor up one line
of < UP)
If
the
cursor is in the top line
If
the cursor is in the top line display previous line(s) of text. The cursor remains in the same column as before the
command.
This command accepts any count where count multiplies the distance moved.
count
is
/ or greater
to
the current cursor position, the cursor jumps to the first line
of
a repeated move is not displayed until the move
<
DOWN)
DOWN
command moves the cursor down one line
<
If
the cursor is on the bottom line
If
the cursor is in the last line
cursor remains
are-
of
the file, the command
of
the screen, the screen
than
the number
<
HOME)
DOWN)
in
the same column as before the command.
are-
of
of
the file, the command
of
text on the screen, the screen scrolls up. The
in
the same column.
is
ignored.
is
rewritten/scrolled to
lines that exist from the beginning of the
of
the file. The
is
complete.
in
the same column.
is
ignored.
Count.
If
cursor position to the end result
Related Commands.
3.1.5
The
1.
2.
This commaAd accepts any count where count multiplies the distance moved.
count
is
/ or greater
of
a repeated move is not displayed until the move
than
the number of lines that exist in the file from the current
of
the file, the cursor jumps to the last line of the file. The
<
HOM
E )
< HOME)
HOME
Quick cursor movements. < through a file or cursor movement command.
Line edit prompts to enter reedit mode.
command has two functions.
HOME)
jump
to the end or beginning of a line, depending on the previous
If
<
DOWN)
leaving the cursor in the same column as at the
need to press <
(
HOME) < HOME) < HOME)
If
<
UP) leaving the cursor need to press
If
<
LEFT)
of
the
line
If
(RI G HT)
the line.
was the previous command, the next page of text
DOWN)
was the previous command, the previous page
in
the same line as
(UP) was the previous command, the cursor moves to the beginning
only once for multiple paging.)
was the previous command, the cursor moves to the end
is
complete.
allows you to page forward or backward
start
of
the command. (You
only once for multiple paging; e.g.,
pages three times.)
of
text is displayed,
at
the
start
of the command. (You
is
displayed,
(DOWN)
of
3-2
Editing Commands
Count. it multiplies the distance moved.
Related Commands. <
3.2
The < RETURN) cases
Count.
If
cursor position to the end
Related Commands.
3.3
Count is significant only for
LEFT), < RIGHT), < UP), < DOWN)
CARRIAGE
of < RETUR
If
the
cursor
end
of
the file.
If
the
auto indent option
to
the
first nonblank
If
the
cursor
line.
This command accepts any count where count multiplies the distance moved.
count
is
/ or
greater
RETURN
key moves the cursor to the beginning
N)
are-
is
on the last line
(SET
character
is
on
the
last line
than
the number of lines
of
the file, the cursor jumps to the end
SET
Indent
< CTRL-C) Function Key
(UP)
and
Command
of
the
file, <
Indent)
of the next line.
of
text
is
on, <
on
the screen, the screen scrolls up one
(DOWN)
RETURN)
RETURN)
that
exist
<
HOME)
of
the next line. Special
moves the cursor to the
moves the cursor
in
the file from the current
of
the file.
s,
where
<
CTRL-C)
as it
is
used
to
or
repeated long macros. The termination allows termination without affecting abort
the
an infinite loop
3.4
TAB Function Key
Pressing the display is cyclic
3.5
Delete Function Keys
(
RUBOUT)
configurable: delete
<
DELR
serves as a soft command abort. A
typed, even if a command
terminate a time-consuming command while
execution
TAB
) , and delete line
of
an
I/O
in
macro execution gracefully.
key causes the next prompt line to
(i.e., after the last prompt line
is
a specifically labeled key.
character < DELCH
is
related command. This option
(DELLI).
3.5.1 < RUBOUT)
The
RUBOUT
preceding carriage return
key deletes the preceding character.
is
deleted also.
(CTRL-C)
in
progress. Therefore,
it
is
carried out
AEDIT-86's
),
integrity. <
is
displayed, the first
The
other delete function keys are
delete left <
is recognized as soon
(CTRL-C)
is
executing, e.g., a long
at
the first opportunity
CTRL-C)
is
the only way to abort
be
displayed. The prompt line
is
DELL),
If
a line feed
does not
redisplayed).
delete right
is
deleted, the
may be
FIND
that
There Count.
is
no recovery from this deletion.
(RUBOUT)
ignores count.
3-3
Editing Commands
AEDIT -86 User's Guide
3.5.2
The deletes the character line feed (if any) return/line
There Count.
If
on
< DELCH )
DELETE
is
count is greater than 32, the message "cannot delete more than
the
message line.
CHARACTER
uunder" the cursor.
is
also deleted because
feed pair as a single character.
no recovery from this deletion.
This command limits count
command
to
is
configurable, usually as <
If
a carriage return is deleted, the following
in
this case, AEDIT-86 considers the carriage
32
to prevent accidental destruction of the file.
3.5.3 < DELL)
The
DELETE
all characters to the left The deletion can be recovered with the Count. Related Commands.
3.5.4 < DELR
The
LEFT
DELETE
)
command
of
the cursor
LEFT
command ignores count.
<
UNDO)
is
configurable, usually
on
the line on which the cursor
<
UNDO)
as < CTRL-X
command.
CTRL-F
32"
is
).
is
positioned.
) . It
displayed
It
deletes
The
DELETE all characters to the right except for the carriage
The deletion Count. Related Commands.
3.5.5
The
DELETE the entire line on which the cursor up one row. The cursor
The deletion can be recovered with the Count. Related Commands.
3.6
The ters deleted by command LINE, Consecutive
< UNDO) Command
UNDO
the
RIGHT
can be recovered with the <
The
DELETE
command
of
return/line
RIGHT
<
UNDO)
is
configurable usually
the cursor on the line on which the cursor is positioned,
feed pair.
command ignores count.
< DELLI)
LINE
The
DELETE
command is configurable, usually as <
at
the current cursor position.
cursor moves to the beginning
<
CTRL-U
the
command
is
LINE
<
UNDO)
last
DELETE
) s repeat the restoration
is
configurable, usually as <
is
positioned. All lines below the deleted line move
left in the same position on the
command ignores count.
LEFT,
as < CTRL-A).
UNDO)
<
UNDO)
DELETE
If
of
command.
new
command.
CTRL-U
RIGHT,
the previous command was
the
current line before the restoration.
of
the same string.
CTRL-Z).
line.
) .
It
restores charac-
or
DELETE
It deletes
It deletes
LINE
DELETE
3-4
AEDIT
-86
User's
Guide Editing Commands
Count.
Related Commands. <
3.7 < HEX)
The < HEX)
character
cases:
When
To that inserted; however, it directs the if, in cursor position.
<
It
The < UNDO)
into the text as its
When
the
character
mal value over
the
character
e.g.,
if
you want to insert the <
insert a
are interpreted as
HEX) cannot
character
INSERT
can be activated under
be activated
command ignores count.
DELL), < DELR
Function
prefix (usual1y configured
to be inserted has no key; e.g., a
7FH.
to be inserted has a special function
using <
the
ASCII
mode, you type <
at
main command level.
Key
ASCII
ESC)
HEX)
value
treatment
HEX)
INSERT,
), < DELLI)
to < CTRL-H » is
value. This feature
character
, you should type <
of
the character. <
of
the next two characters. For example,
SA, the letter Z will be inserted
XCHANGE,
is
useful in the following
character
in
into your text.
HEX),
HEX)
and line-edited prompts.
used
to
insert a
with a hexadeci-
the current mode,
then two digits
is
unseen and not
at
the
3.8
INSERT
INSERT mode and return to main command level, press <
mode allows you to enter text.
Mode
To
enter
INSERT,
ESC)
3.8.1 Description
Press
I;
AEDIT-86
[insert]
The
prompt [insert] cursor to any location in the text and begin typing; the the
text.
<
ESC)
level.
The or < HOME)
<
DELL), < DELR ) ),
command level.
The new location.
causes the editor to leave
cursor movement commands ( <
cursor movement commands and the delete keys restart
prompts-
is
displayed whenever
),
the
delete
and <
AEDIT-86
INSERT
LEFT), < RIGHT), < UP), < DOWN)
keys ( <
UN
RUBOUT),
DO)
al1
is
mode and return to main command
function the same as they do
press I.
.
in
INSERT
characters
<
DELCH
INSERT
To
exit
INSERT
mode. Move the
are
inserted into
), < DELLI)
at
main
mode at the
,
,
<
RETURN)
beginning
inserts a carriage
of
the next line.
return/line
feed pair and moves the cursor to the
3-5
FAlitiBg Commands
<
INSERT commands « LEFT),
( <
ters
<
level.
CTRL-C)
mode was restarted by one of the following commands: cursor movement
DELCH
deleted
DELR
).
deletes all text inserted since the beginning
<
RIGHT),
), < DELLI), < DELL),
with <
After restoration, <
RUBOUT),
CTRL-C)
<
UP
), < DOWN) ) or
< DELR ) ), but does not restore charac-
<
DELCH
), < DELLI),
returns the editor to main command
of
INSERT
mode,
delete
<
DELL),
AEDIT
-86 User's Guide
or
since
keys
or
The < HEX), < MEXEC),
are the same
<
HEX) hexadecimal digits, are interpreted is described above.
<
MEXEC)
When
<
MEXEC)
<
FETN)
<
FETN)
fetches the assigned value. <
<
FETS)
<
FETS)
or the second letter from the read-only string variables) fetches the assigned value.
<
FETS)
In
INSERT exceptions are non-modeless macros that consist of nonrestarting commands only. (See Section 5.3, macros.)
INSER cursor in the current line delete
or
in
both
INSERT
is
unseen and not inserted. The next two characters, which must be
is
the macro execution key. This character
<
MEXEC)
is
is
the fetch numeric
is
pressed, the next character (which must be a numeric value from
is
the fetch string key. This character
is
pressed the next character (which must
is
described in Chapter mode, macro execution usually restarts the insert process. The only
T mode
move subcommand (except <
is
pressed, the next character
described in detail
"Macro
is
modified if it
< FET.N
and
key.
FETN)
Modes," for a description
is
is
moved down one line. The text
),
and <
FETS)
XCHANGE
as
the hexadecimal values of a character. <
in
Chapter
This character
is described
6.
preceded by a forward slash (0. All text past the
RUBOUT)
modes.
is
5. is
unseen and not inserted. When
in
Chapter
is
unseen and not inserted. When
of
) or when insertion
functions described here
HEX)
is
unseen and not inserted.
treated as a macro name.
6.
be
a numeric value from
modeless and non-modeless
is
restored before any
is
complete.
0-9)
0-9
3-6
Count. Related Commands.
3.9
XCHANGE exit
3.9.1
Press X; AEDIT-86
Repeat count
is
not a valid option
SET
XCHANGE Mode
mode allows you to type over text. To enter
XCHANGE
Description
mode and return to main command level, press <
prompts-
Indent,
SET
in
INSERT
Autonl
mode.
(exchange)
The
prompt [exchange]
Move
the
cursor to any location on a one-for-one basis. The carriage return/line feed pair line
is
extended.
is
displayed whenever AEDIT-86
in
the text and begin typing; characters are replaced
XCHANGE,
is
in
XCHANGE
is
not replaced; instead, the
press
ESC).
X.
mode.
To
AEDIT
-"
User's Guide Editing Commands
<
ESC)
level.
The
<
HOME),
<
DELL), < DELR)
level.
The the
< R
character
<
RETURN)
carriage return/line feed pair and moves the cursor to the beginning
<
CTRL-C)
you have exchanged text and pressed < the cursor movement commands «
or < HOME) ration, <
causes the editor
cursor movement commands <
and
the
cursor movement commands and the delete keys restart
new
location.
UBOUT)
If
the line has been extended, <
and deletes the character immediately to the left
If
the cursor
character to the left but does not delete the character.
replaces the character to the left
(if
it has been exchanged), with the following exceptions:
is
at the original replacement location, <
replaces the character
restores original text (text before it was exchanged). However, once
), changes cannot be revoked by pressing <
CTRL-C)
to
leave
XCHANGE
LEFT). < RIGHT). < UP). < DOWN)
delete
and <
returns the editor to the main command level.
keys
(except
DELLI)
,and < UNDO)
RUBOUT)
"under"
ESC)
LEFT), < RIGHT), < UP), < DOWN),
mode and return
for <
RUBOUT»
work as at main command
of
the cursor with the original
works as at main command level
of
the cursor.
the current cursor position with a
or restarted
to
main command
<
XCHANGE
RUBOUT)
of
XCHANGE CTRL-C).
DELCH
moves one
the next line.
with any
After resto-
mode
).
at
of
,
The < are the same in both
hexadecimal digits. are interpreted as the hexadecimal values of a character. < is
When
the assigned value. <
second letter from the read-only string variables) fetches the assigned value. is
Macro execution only exceptions are non-modeless macros that contain non-restarting commands only. (See Section 5.3, macros.)
Count. Repeat count
HEX).
(
HEX)
described above.
<
MEXEC)
<
MEXEC)
(
FETN)
<
FETN)
<
FETS)
(
FETS)
described
is
(MEXEC)
is is
is is
in
(MEXEC),
INSERT
unseen and not inserted. The next two characters, which must be
is
the macro execution
is
is
described in Chapter
the fetch numeric key. This character pressed, the next character (which
FETN)
the fetch string key. This character pressed. the next character (which
Chapter
6.
in
XCHANGE
"Macro
is
not a valid option
<
FETN).
and
XCHANGE
pressed the next character
is
described
mode usually restarts the
Modes," for a description of modeless and non-modeless
and <
key.
This character
5.
in
in
XCHANGE
FETS)
modes.
is
is
a numeric value from
Chapter
is
is
a numeric value from
functions described here
is
unseen and not inserted.
is
treated as a macro name.
unseen and not inserted. When
6.
unseen and not inserted. When
XCHANGE
mode.
HEX)
0-9)
fetches
0-9
or the
(FETS)
process. The
Error. characters without restarting
100 characters.
"Xchange limit
is ) 00"
is
displayed if you attempt to exchange over ) 00
XCHANGE
mode.
XCHANGE
mode has a limit
of
3-7
FAlitiag
Commands
AEDIT -86 User's Guide
3.10
The the file for a string of
FIND
FIND
command searches forward from the current cursor position to the end of
the string.
Command
of
characters and positions the cursor after the next occurrence
3.10.1 Description
Press F; AEDIT-86
<HOME)
F 1 n d { mode} H targeLstring
The last target string options currently
Note that pressing return/line feed into the target string and adds the prompt line.
FIND
the The
cursor is placed immediately after the next occurrence string message line and the
The
following attributes affect operation of the
Case - consider case of Find target
Showfind - list lines or multiple finds
K_token - find only token strings
You
command.
is
not found, the message "not found: "target string" "
prompts-
to
re-edlt
II
(if
any) is displayed within quotes. mode refers to the
in
effect that may influence the
<
RETURN)
must press
FIND
command
when specifying a target string inserts a carriage
(ESC)
to complete the string specification and execute
is
marked as failed.
FIND
FIND
command.
RETURN
command:
symbol,
of
the target string.
(nl),
is
displayed in the
SET
to the
If
the
Case, Showfind, and K_token refer to features set using the described later
Case refers to upper- or lowercase letters. are equivalent.
If
Showfind
The Token is the argument between delimiters. Token characters are all characters that
are not delimiters. For example, if you want to find the word is
paragraph, but not the
word
is
is
The
string
(Tk), and Showfind
is set to yes. The
following are examples
FIND FIND FIND
To The
-{
-{
-{
abort a (-
message "found:
in
this chapter.
If
Case
is
yes, each line that contains the target string
is
in
displayed.
found because it is enclosed
-{
mode}
If
more than one feature
Cs}
" ... "
Tk
Sh}
} ..... "
)FIND
contains an abbreviation for the. features, Case (Cs), Token
(Sh). The abbreviation
of
mode:
Consider case = Token and Showfind =
" "
No
option
command, press
count"
is
displayed when the command
If
SET K_token
in
delimiters.
is
is
yes, the features are separated by a blank.
yes
is
set (CTRL-C).
is
no, upper- and lowercase letters
displayed only if the specified feature
yes
SET command, which
is
displayed.
in
the preceding
is
yes, each occurrence of the
is
complete.
is
3-8
AEDIT
-86 User's Guide
Editing Commands
Count. of
the Error.
returns Related
times
target
""not
to main
The
FIND
to
search for a
string
is
found:
command
Commands.
command accepts any count where count indicates
target
found
or
count
targeLstring"
level.
SET
Case,
3. 11 -FIND Command
The
-FIND
tions:
-FIND the
The
The
3. 11. 1 Description
Press
----
-
fin
command
is
identical
searches backward from the current cursor position to the beginning
file.
Showfind option
is
ignored.
cursor is positioned on the first
-;
AEDIT-86
<HOME)
d { mode}
prompts-
to
re-edit
It
targeLstring
string.
is
exhausted.
is displayed
SET
K_token,
to
the
lt
The
search stops
FIND
character
the
number
after
the last occurrence
if
no match
SET
Showfind
is
found, and the
editor
command with the following excep-
of
the matched string.
of
of
The
last
target
string
(if
any)
is
Related Commands.
3.
12
REPLACE Command
The
REPLACE
to replace the old
command
target
allows you to delete a
displayed
SET
Case,
SET
is
similar to the
string with a new string.
target
string.
in
the quotation marks.
K_token
FIND
command except
The
REPLACE
that
it
command also
3. 12. 1 Description
Press R;
----
Rep
The last target string The
them
Press <
Press <
AEDIT-86
<HOME)
1
IS
C e {
to
mode}
prompts-
re-edit
••
targeLstring ..
(if
any)
is
displayed within the quotation marks.
prompt line contains two line-edited argument. You may edit either or both of
in
the
following ways:
HOME)
to enter the reedit mode; to enter a new target string simply
type the new string.
ESC)
replacement string;
----
Rep
<HOME)
1
IS
C e { mode}
to terminate editing the target string and
AEDIT-86
to
II
prompts-
re-edit
targeLstring
It
wit
h
.1
replacemenLstring
start
editing the
II
allows you
3-9
EtiitiDg
Commands AEDIT -86 User's
If
you want to return
cursor on the first position
Press <
the first character replacement string as necessary.
Press <
target/replacement strings and to start the replacement process.
To
delete a target string from text, the replacement string must be an empty string.
The
first time therefore, press < REPLACE type a character and press < R
<
ESC)
command.
ESC)
ESC)
you
request REPLACE, the replacement string
ESC)
command.
a second time
to
editing the target string, press <
of
the replacement string.
if
you
are
on
the target string and <
of
the replacement string to reedit the target string and the
while editing the replacement string to terminate editing the
to
enter an empty replacement string and execute the
If
a replacement string from a previous command
UBOUT)
to
enter the empty replacement string and execute the
to remove the character. Then press
RUBOUT)
RUBOUT)
will
be an empty string;
with the
if you are on
is
displayed,
Guide
Operation alent to the
Case - consider case
Showfind - list lines
K_token - find only token strings Case, Showfind, and K_token refer to features set using the
described later in this chapter. Case refers to upper- or lowercase letters.
are
If
Showfind
The (Tk), is set to yes.
To
abort a
The complete.
The changes the other's default target.
Count.
number
occurrence
of
the
REPLACE
FIND
command):
equivalent.
is
yes, each line
string
message "found: count replaced: count"
(?)REPLACE
-{
mode}
and Showfind (Sh).
If
more than one feature
REPLACE
and
The
REPLACE
of
times to replace a target string. Replacement stops after replacing the last
of
the target string or count
command
of
Find target
or
multiple finds
that
contains an abbreviation for the features, Case (Cs), Token
The
abbreviation
command, press <
(-)FIND
command accepts any count where count indicates the
is
affected
If
contains the target string
is
yes, the features are separated with a blank.
CTRL-C
commands share the same target string and each
is
exhausted.
by
the following attributes (equiv-
Case
is
no, upper- and lowercase letters
is
displayed only if the specified feature
) .
is
displayed when the command
SET
command, which
is
displayed.
is
is
3-10
Error. returns to main command level.
Related Commands.
3.
The
"not
found: targeLstring"
SET
Case,
13
?REPLACE Command
?REPLACE
command
is
3.13.1 Description
Press
?;
AEDIT
----
? Rep 1 e c e
<HOME>
-86
prompts-
to
{mode}
re-edlt
II
targeLstring"
is
displayed if no match
SET
K_token,
the conditional
SET
Showfind
REPLACE
is
found, and the editor
command.
AEDIT-86 User's Guide
The
?REPLACE
the
following prompt
ok
to
replece?
works exactly the
is
displayed on each find:
(y
or
same
[n])
as
the
REPLACE
command except
Editing Commands
that
If y (or
response.
·3.14
The command, move the cursor to one
the file. After the
3.
You can set four tags: A,
The
Press T; AEDIT-86
The
If after
Y) is typed, the replacement is made. Any other
TAG Command
TAG
command allows you
current cursor position. Tags
tag
is
set, the editor automatically returns to main command level.
14. 1 Description
cursor's current position determines the tag location.
prompts-
tag
is set by pressing A,
the section containing the
the deleted section.
B,
to
specify four locations in a file and, with the
of
these locations. The
are
invisible and are not saved when you exit the
C, and
B,
D.
C, or
tag
is
deleted, the tag
D.
key
is considered a negative
JUMP
TAG
command relates to
is
"moved" to the first position
Each input file (main or
Count.
Error. AEDIT
Related Commands.
3.15
The automatically returns to main command level.
3.15.1
Press
Count.
The
TAG
··invalid command"
-86 returns to main command level.
JUMP Command
JUMP
command moves the cursor to a specified location in text. The editor
Description
J;
AEDIT-86
The
JUMP
OTHER)
command ignores count.
is
JUMP
prompts-
command ignores count.
has its own set of tags.
displayed if a key other than A,
B,
C, or D
is
pressed.
3-11
Editing Commands AEDIT -86 User's
The
Tag
subcommand is executed by pressing A,
specified tag, previously set with the
TAG
B,
command.
C,
or
D.
The
cursor
jumps
to the
Guide
Error.
Related Command.
Start
The the
End
The the
Line
The
11
The
I;
number
Error. other
Uno
such
tag"
is displayed if
TAG
Start
subcommand is executed by pressing S. It moves the cursor
file.
End
subcommand
file.
Line subcommand
n e :
cursor jumps to
the
maximum value allowed is 65536.)
of
lines
in
"illegal value"
illegal value
is
executed by pressing
is
executed by pressing L.
the
start
the file, the cursor jumps to the
is
displayed if a value larger
is
entered.
the
specified
of
the designated line.
If
tag
does not exist.
E.
It
moves the cursor to the end
It
prompts for a decimal value:
(The
first line
the value entered
EOF
marker.
than
the maximum value
of
is
greater
to
the
start
of
of
a file is number
than the
or
any
Position
The
Position subcommand is executed by pressing P.
column:
The
cursor jumps to the designated position in the current line. The first position
a line
is
0;
the
maximum value allowed is 254.
If
the
current line
to
the last position in the line.
If
there is no character at the specified position (due to
jumps
to
the next character.
Error. other
3.
The
is equivalent). The then
"illegal value" is displayed
illegal value
16
BLOCK Command
BLOCK
be
command is invoked by pressing B (or D; typing either B
deleted, moved,
is
shorter
is
entered.
BLOCK command allows you to delimit a section
or
than
copied.
the designated position value,
if
a value larger
The
subcommand determines if the text will be
It
prompts for a decimal value:
the
tab
expansion), the cursor
than
the
maximum value
of
in
cursor jumps
or
any
or
D initially
text
that
can
3-12
AEDIT
-86
User's
Guide
Editing Commands
deleted, moved, the
Block buffer.
the
Block buffer.
in
The
commands (-)FIN
<
RIGHT), < UP). < DO\VN
as at main
Text
saved in
command.
at
file)
Pressing < its
Pressing < its original position at the beginning
the
current
3. 16. 1
The
Block commands. the
Block
The
contents
DELETE
the
old contents.
or
The
command
the
Block
The
GET
current
lSC)
position.
CTR
L-C)
Block
buffer
command.
buffer
It
has
of
Buffer
is
is
the
copied.
The
cursor
returns
the
a fixed
over 2 Kbytes, the
The
Buffer
Delete
le\
command
buffer
when a new section
subcommand
Put
subcommand
D,
JUMP,
), < HOME).
t:1.
buffer
(or
copies the contents
position
the
editor
returns
buffer associated with
the editor to main
maximum
remain unchanged until you execute
subcommand
deletes the delimited section
copies
and
the
cursor
in
an external file) can be retrieved with the
in
your file.
to
main
command
of
the delimited section.
the
size
of
2 Kbytes.
remainder
of
text
copies
the
delimited section to
and
the
section
movement
and <
of
command
BLOCK
is
written to a
is
written to the buffer, overwriting
to
an external file.
commands < LEFT)
RETURN)
the Block buffer
level with
level with the
and
DELETE
If
the section to be copied to
work the same
(or
the
cursor left
temporary
another
places it
GET
external
cursor
(and
GET)
work file.
BLOCK
,
in
at
or
3.16.2
To
Press B
one endpoint
beginning endpoint first.
Press B (or
Buffer
Move character second
Now
mand.
Count.
Related
Buffer
To
@ signs
delimited section
Description
delimit a section
or
D;
the
@ sign serves as
of
the
D);
AEDIT-86
Delete
the
cursor
under
@"
is
specify one
The
Command.
execute
are
to
the
not.
of
BLOCK
the
Buffer
removed:
of
of
block. Endpoints can be set
the first @ sign
the
command
GET
the
text
text. move
the
prompts-
r i n d
character
subcommands
subcommand,
delimited section
is
not affected.
immediately
is
included
ignores count.
the
cursor
delimiter
-
fin
by pressing
press
to
the first
and
in
either
Jump
d
after
in
the
block, but
the
B.
It copies text to the Block buffer.
of
text is copied
character
replaces
the
order; this example sets the
of
character
Put
the block to be delimited.
the
character
initial letter
to
of
the
Block buffer.
that
the section.
marking
The
under
the
subcom-
The
The
3-13
Editing Commands
Delete
To the of
execute
text
the
Block
and
the
Delete
moves it
buffer
subcommand,
to
the
Block buffer.
that
is in memory,
press D.
If
the
the
menu
It
deletes
deleted text does not fit in
prompts-
the
delimited section from
the
AEDIT
portion
-86 User's
Guide
cannot
If
n is specified,
updated. file. Press <
Find
To command
-find
To at
execute
execute
main
command
If
level.
Jump
To
execute
command
Put
The
level.
Put
subcommand
5ave
you press
CTRL-C)
the
the
the
in
memorY--5ave
the
delimited section
any
other
to
abort
Find
subcommand,
-find subcommand, press level.
Jump
subcommand, press
allows you
of
key,
the
delimited section is written
the
command.
press F.
the
to
copy a section
anyway?
text
is deleted,
It
works the
hyphen (-). It works
J.
It
works the
but
of
text to a named
([yl
the
same
same
or
n)
Block
buffer
to a temporary
as it does
the
same as it does
as
it does
output
at
at
file.
is not
main
main
Press P;
----
Out
The The be
If
displayed:
overwrite
If
file.
If
The system.
AEDIT-86
<HOME)
put
f 1 1 e : filename
filename delimited section
specified.
the
The
specified file already exists,
prompts-
to
of
the
previous
of
delimited section is not affected.
exi5ting
y is specified,
any
other
specified file
the
delimited text is written to the named file, overwriting the previous
key is typed,
can
also be written
re-edit
command
text
may
the
editor
file?
3. 17 DELETE Command
To
invoke
deletion
the
of
a section
DELETE
of
command,
text
by
typing D
(if
any)
be copied
the
editor beeps and
(y
returns
press D.
to
an
at
to
output
The
both
is
displayed
to
this file or a different filename
or
[n])
the
BLOCK
device (e.g., :Ip:) supported
DELETE
endpoints.
to
the
right
of
the
following prompt is
Put
prompt level.
command exists
the
by
to
colon.
may
your
enable
3-14
AEDIT
-86
User's
Guhle
Editing Commands
3.18
The inserts
GET Command
GET
command
it
at
the
retrieves
current
the
contents
cursor position
of
in
your file.
the
3.18.1 Description
Move
the
cursor
to
the point in your file where you want the contents
(or
external file) to be placed.
Press G;
----
I n
The right
To
<
then press
The character.
Count. This
current
If
message.
AEDIT-86
<HOME)
put
f
lIe
filename previously specified for the Get command
of
the colon.
insert the contents
RETURN) . To
(ESC)
editor
/G
returns
location count times.
is
typed,
prompts-
to
re-edit
:
filename
of
the
Block buffer
insert the contents
or
(RETURN).
to main command level with the cursor on the first inserted
command
AEDIT-86
accepts any finite count.
The
returns to main command level without issuing
of
an
external file, type the
repeat count / is not valid with the
Block buffer
at
the current cursor location, press
The
or
an external file
(if
any)
named file
of
is
displayed
name
of
is
copied to the
GET
the
the
command.
an
and
buffer
to
the
file,
error
Related
3.19
To the text on the screen so that the row containing the cursor (the viewrow) on you to problems). Reverse scroll
VIEW indicator, system-id, and
Count.
Related
3.20
AEDIT-86 buffer; press editing text in the
Command.
BLOCK
VIEW Command
execute the
the
row
are
refresh the screen image
also issues an abbreviated sign-on message, which includes the busy
the
O.
VIEW
that
editing to position the viewrow on line )0, for example.
The
is
The
VIEW
Command.
OTHER
has other
It
allows you to switch from editing text
command, press
you have defined. In this way you
if
viewrow
implemented as
is
set with the
AEDIT-86
command ignores count.
SET
Viewrow,
V.
This command a)]ows you to rewrite (move)
it has been corrupted (e.g., power failure, terminal
SET
Viewrow command; the default
VIEW
on terminals without reverse scroll.
version number.
WINDOW
Command
two distinct buffers.
is called the
other
or
secondary buffer.
The
OTHER
text
area
buffer.
may
rewrite (move) the text
used at
To
execute the
in
one buffer. the
startup
VIEW
OTHER
is
caJled
current
is
positioned
is
also useful
/waiting
the
command.
buffer,
area
is
5.
main
to
3-15
Editing Commands
Pressing 0 a second time returns the editor to the main buffer.
AEDIT
-86 User's Guide
Main and into two windows using
OTHER
buffer text may be displayed simultaneously
the
WINDOW
command.
by
splitting the screen
3.20.1 Description
Press
0;
the message hOther Editing input file" or, if
hOther no input file" is displayed at the start of the message line whenever the secondary text
- - - - 0 AgBin
The
OTHER
buffer.
It
is
possible to display both the main and the screen into two windows using the the
OTHER
results Each partition has a separate set
own partition; it cannot value for partitions.
Press 0 to exit the
in
is
displayed:
the
rEd
1 t 1 n g input file
Block
buffer allows you to edit a second file
file
switching from one text buffer to the other.
SET
Leftcol.
Celc
in
one window. In this case, switching from one window to the other
jump
The
OTHER
Delete
WINDOW
of
tags. A
to the other partition. Also, each partition has its own
Block buffer
buffer and return to the main buffer.
JUMP
is
common to allow moving text between
no
input file has been specified,
Execute
OTHER
command, then typing 0 to display
command
Find
in
the same way as the main
text buffers
is
-find
by
splitting the
valid only within its
--more--
Count. Count has no meaning for the
OTHER
3.21 AGAIN Command
To execute the cases the last subcommand to be repeated.
In the following commands, mand arguments:
PARAGRAPH
(-)FIND,
In the following command, mands,
• Count. Count
the last command is ignored.
3.22
The AEDIT-86 the target string
but
HEX
SET
SET
AGAIN
(?)REPLACE
without their arguments:
command
is
the count for the repeated command. The value of count given for
command, press
AGAIN
AGAIN
repeats the entire command, including subcom-
repeats the entire command including subcom-
Command
command allows you to set/reset several features that determine
will
operate, e.g.,
of
a search command.
if
case (uppercase, lowercase) should be considered
command.
A.
It
causes the last command or
in
some
how
in
3-16
AEDIT
-86 User's Guide
Most
SET
subcommands relate to switches. A switch
states: yes
or
displayed on
brackets. the
3.22.
Each
SET
command.
1 Description
no. When a subcommand
the
prompt line.
The
of
this type
value currently
feature has a default value; this value
is
an
is
activated, a
in
effect
is
in
effect until it
option
is
that
has only two
yes/no
question is
enclosed in
is
reset using
Editing Commands
square
Press S (press <
Autonl
Indent
Tebs
To
specify an option, press
Count.
Autonl
To
The
activate the Autonl option, press
a new line
insert
If
y,
carriage screen whenever an character carriage
if
pos.sible. Trailing blanks and
TAB)
Bak_fl1e K_token Vlewrow
SET
at
the
right margin,
cr,lf
to view the remaining prompt lines);
Case
lef~col
command ignores count.
automatically?
return/line
attempt
to be inserted is not a white space (i.e., not a space, tab, line feed,
return),
the carriage
is inserted between words. later
).
If
n,
the
option
is
turned off.
Related Commands.
INSERT,
Display Margin
the
initial (uppercase) letter
A.
in
INSERT
E_delimit Hotab
This option aJlows you to automatica]]y
mode.
feed (new line)
is
made
to insert a
return/line
tabs
are deleted, and the carriage
The
last position
SET
Margin
It
prompts-
(y
or
is
inserted
character
feed pair
is
set using
AEDIT-86
Go Radix
of
that
option.
en])
in
the last position on the
in
that
is
inserted before the token,
prompts-
Highbit Showflnd
position.
return/line
SET
Margin (described
--more--
--more--
--mor!--
create
If
the
or
feed
To
execute the Bak-file option, press
of
version
create
If
Update
If
Turning damaged saved
your file.
y,
the
is
n,
this option
off
in
the
It
prompts-
.BAK
files?
file you are editing
executed to save the revised version
is
turned off.
this option
and Bak-file
can
is
backup file.
Case
To
execute
search command.
conSider
If
both, and the case
If
both, but the case
the
Case option, press C. It considers the case
It
case
y,
you can type the
n,
you can type the
prompts-
of
target
is
significant.
target
is
ignored.
Find
B.
It saves a backup file
([yl
is
renamed file.BAK when
or
n)
of
the file.
NOTE
be dangerous.
If
your
file
yes, the most recent version
target?
string
string
in
uppercase, lowercase. or a combination
in
uppercase, lowercase, or a combination
(y
or
that
contains the last
QUIT
is
accidentally lost
of
the file has been
of
the
en])
Exit or
target
QUIT
or
string in a
of
of
3-17
Editiag ComlDods
For example,
If
86
If
86
the target string for the
will find
tHe
only.
the target string for the
will find tHe, the,
THE,
FIND
FIND
etc.
command
command
is
tHe and the option
is
tHe and the option
is
is
set to
set to
AEDIT -86 User's Guide
y,
AEDIT-
n,
AEDIT-
Related commands. (-)FIND,
Display
To execute the Display option, press changes resulting from macro execution.
display
If
y, during macro execution an cursor movements and text changes are displayed
mecro
execution?
(?)REP-LACE
D.
This options allows
It
prompts-
(y
or
(n)
you
to display the text
on the screen.
If
n,
this option
movements or changes
For example, if you execute a macro and
text
that
are changed by the macro execution are displayed
the macro
is
executed.
To execute the E_delimit option, press
new
and REPLACE
----
del
delimiters set using this option. SET E_delimit
commands under token mode.
(HOME)
i m 1 t e r
set:
is
turned off. Thus,
in
the text are not displayed
to
re-edlt
!
..
, % & ' ( ) • + , - • I : i ( • ) ? • [ \ )
when
macro execution starts, cursor
on
the screen.
SET Display Yes
E.
The current delimiter set may be displayed
It
prompts-
is
in
effect, sections of
on
the screen each time
is
used
by
..
{U·
the FIND /
3-18
All characters currently specified as delimiters are displayed to the right of the colon on the prompt
line.
Delimiters have the following properties:
A delimiter
is
always one character.
Characters with hexadecimal values from OOH-20H, and 7FH or more are predefined delimiters. They are not displayed, and they cannot be excluded from the delimiter set.
ASCII
Delimiters are displayed with
Delimiters specified (?)REPLACE
When you specify a set of delimiters,
once. For example,
The default E_delimit string
!
"'1'
characters with the values
no
separating characters
by
SET E_delimit are used to define a token for the (-
operation. A token
you
may separate input delimiters with blanks.
is
any nonempty string surrounded
is-
' ( ) • + • - • I : ; ( • ) ? [ \ )
21
H-7EH
you
may include the same delimiter more than
•.
{U-
are displayed (if specified).
by
delimiters.
)FIND
/ .
AEDIT -86 User's
Guide
EAliting
Commands
Related Commands.
Go
To
execute the Go
(-)FIND/(?)REPLACE
continue
This option is meaningful only command level. for all macros regardless of the current setting should specify file.
The
SET
Go
If
y
is
in effect for the current macro file and a
fails, execution
If
n is in effect for the current macro file, and a command fails, execution returned to the caller, either a macro or main command level.
During but the macro currently defined is executed as if
Related Commands.
MACRO
(-)FIND,
option~
macro
The
default for the
SET
Go Yes
option does not affect a nested macro.
of
the current macro continues, i.e., the next command is activated.
Create, the
MACRO
(?)REPLACE,
press G.
command failed.
It
relates to macro execution continuation
execution
in
macro execution; it has no meaning at main
SET
in
your macro.
of
the current macro
SET
Go command
Create,
SET
It
prompts-
after
Go option, when a macro
of
It
may be reset within the same macro
EXECUTE
K_token
a
failure?
the option.
(-)FIND/(?)REPLACE
is
is
inserted into the macro definition,
SET
Go
after
Cy
or
[n])
is
started,
To
use this option, you
(-)FIND/(?)REPLACE
terminated, and control is
is
Yes.
is
No
command
a
Highbit
To
execute the Highbit option, press H.
hexadecimal values over 7FH.
display
If
screen as
If
Indent
To
execute the Indent option, press I. This option is useful when entering code for a
structured language such as
automatically
If
ca])y indented to the position first line (after a blank line), pressing
o
of
nontab character
If
The Indent option is not active if a carriage return prefix ( <
parity-on
y,
all text characters with hexadecimal values over
is.
n,
all text characters with hexadecimal values over
indent
y in
INSERT
the next line. At main command level, the cursor moves to the first nonblank.
n,
this option
HEX)
mode and <
in
is
turned off.
OD)
or
It
prompts-
characters
PL/M
or Pascal. It
during
RETUR
of
the next line.
if
a line feed
It
allows the display
as
is?
7FH
prompts-
insertion?
N)
is pressed, the next line
the first character of the preceding line. For the
<
RETURN)
is
inserted without a carriage return.
moves the cursor to position
is
inserted using the <
of
characters with
Cy
or
[n])
7FH
are written to the
are displayed as ?
Cy
or
is
automati-
[n])
HEX)
is
This option
Related Commands. Carriage Return,
not active in
XCHANGE
mode.
INSERT
3-19
FAliring
ColDllUlndS
AEDIT
-86 User's Guide
To execute the K_token option, press if
it is enclosed
find
only
by
delimiters and
token
strings?
Token characters are all the characters that are not delimiters. A token a nonempty string surrounded by delimiters. Delimiters characters specified
If
y, a string
in
SET E_delimit.
is
found
by
the (- )FIND or (?)REPLACE command only if the
K.
This option allows
is
not part of a larger string.
(y
or
[n])
you
to find a string only
It
prompts-
is
defined as
in
this context are the
string fits the token definition.
A string SET
effect
in
the text that
K_token No
ONLY
if that string
is
found
is
in
effect will also
by
(-)FIND
is
a nonempty string surrounded
or (?)REPLACE commands when
be
found when SET K_token Yes
by
delimiters.
is
in
Delimiters include the beginning and end of a file, the cursor position, carriage return and line feed.
If
n,
a string
Related Commands. (-)FIND, (?)REPLACE,
Leftco.
in
the text
is
found regardless of the characters that surround it.
SET E_delimit
To execute the Leftcol option, press L. The option allows viewing lines with more
80 characters.
than
left
<HOME> column:
It
prompts-
to
re-edit
0
The current left column you to
o to
characters
view
lines over
175
(position count starts at 0). The number input indicates the number of
at
the start of a line that should not be displayed.
For example, if a line will display the line from position
An exclamation point
is
displayed to the right
80
characters long
is
90 characters long,
(!)
is
printed in column 0 when characters to the left are not
21
to the end
on
of
the colon. This command allows
the screen and accepts any number from
you
can set Leftcol to
of
the line.
displayed. Leftcol can also be set by typing the plus sign
by a valid decimal number. This sets the left column
(+)
or the minus sign
at
the current value plus or
minus the number given. AEDIT-86 may have two different values for Lefcol simultaneously,
file and one For example,
L(eftcol) -10, the Error.
Margin
To execute the Margin option, press M. for left and right margins for reformatting a paragraph.
for
the
OTHER
if
the left column
new
6'bad Leftcol"
file. The default Leftcol for both files
is
left column is
displayed if
currently set
is
position you
attempt to set a value out of range.
It
at
position
5.
allows setting values for indenting, and
15
It
prompts-
and
20
and the screen
(-)
followed
one
for the main
is
zero.
you
type
S(ET)
3-20
---­indent,
<HOME>
left,
to
re-edit
r1ght:
~,O,
76
AEDIT -86 User's Guide Editing Commands
The
current separated margin, left, from than
the
by
one
offset from position
values for indent, left,
by commas.
and
the
third
the
0-253;
indentation
or
more blanks
and right, from 1--254.
and
O.
and
right
are
The
first
number
right margin. Indent
sets the indentation,
may
The
value
the left margin. When entering
or
CJ
The
comma. default
The
values
of
values are 4, 0,
displayed
to
the
right
the
be set
at
any
value from
of
the right margin must
the
values,
aJ)
three
numbers
and
76.
of
second
separate
are
absolute
the
the
be
colon
left
0-253;
greater
them
and
Press < ESC) command
To
set indent
8ET)
To
I<ET)
Related
Notab
To
inserted
insert
Note
(HEX)
( Related
Radix
level.
I<argin)
reset
the
I<argin)
Commands.
execute
the.
tabs
blanks
If
y,
blanks
the
INSERT
If
n,
this
that
this option does not affect
09).
Commands.
or < RETURN)
to
0, left
to
-
5,
left
margin
2
PARAGRAPH,
Notab
with
the
appropriate
for
are
inserted instead
or
XCHANGE
option is
turned
SET
to
5,
and
right to 70,
70
<RETURN>
to
2,
type-
<RETURN>
SET
option, press N.
number
tabs'?
of
mode.
off.
tabs
Tab
execute the
commCJnd
type-
Autonl
This
option instructs the editor to replace
of blanks.
(y
tabs
whenever you press the <
that
It
prompts-
or
(n])
are
entered using the <
and
return
TAB)
HEX)
to
key in
main
prefix
To
execute
(base)
- - - ­Alpha
This
(described For
more
Related
Showfind
To
execute
target
list
If
and string space to
If
the
Radix
option, press R.
in which an
cur
AEDIT-86
r e n t R a d i
Binary
option affects values inserted
in
Chapter
6).
on Radix, see
Commands.
the
string
in a FIND/REPLACE
lines
y,
when you execute a
each
text line
INSERT,
Showfind option, press S. It is used to display all lines containing
on
is displayed on a
continue"
n,
the
FIND
and
not cleared, and text lines
variable will be inserted
x:
radix
DeCimal
The
Radix default
Chapter
XCHANGE
multiple
FIND
that
contains
separate
is displayed.
(?)REPLACE
that
This
option allows you
Hex
or
exchanged by the Fetch operation <
Dc
is
Decimal.
t a I
in
the
to
determine
text. It
6.
command.
finds'?
or
(?)REPLACE
the
target
line.
commands
string
When
It
prompts-
(y
or
(n])
command, the screen
is
displayed on
the screen
is
full,
execute as usual. but
the
contain the string are not displayed on
prompts-
the
screen.
message
the
the
the
radix
FETN
is
cleared,
Each
"hit
screen is
screen.
)
the
3-21
EditiD&
ColDDlaDds
AEDIT -86 User's
Guide
Related
Tabs
To
----
T I b
The
settings,
To
comma. the
screen.
The
The
For
4
5,6,10
o
Commands.
execute
the
(HOME)
is:
4
prompt
enter
tab
default
difference between the last two
example-
line lists
type
(CTRL~C)
tabs,
The
numbers
settings does not
tab
sets sets sets
FIND,
Tabs
option, press T.
to
the
type a list
must
settings
tabs
at
4, 8, 12, 16, ...
tabs
at
5, 6, 10, 14, 18, ...
tabs
at
4, 8, 12, 16, ...
are
(?)REPLACE
This
option allows you
re-edit
current
of
change
tab
settings.
to
return
to
main
decimal
be
every fourth position, i.e., 4, 8, 12
numbers
specified in increasing order, from
the
file contents,
numbers
If
you want only
command
separated
but
it
specified for
to
set tabs.
level.
by
at
least one
may
affect its display on the
....
tabs
is
It
to
inspect
}-253.
repeated,
prompts-
the
blank
or
Changing
up
to
253.
tab
a
NOTE
-Columns 7,11.
Errors.
Related
Viewrow
To
execute
for rewriting
row
for
The
current
of
the
row on which you wish
This
value is 25 rows, then text size is 23 (25 minus Therefore,
The
default
terminals.
If
the
screen is split using separately window size.
start
at
0, not
1.
hbad
tabs"
is displayed
Commands.
the
the
VIew:
viewrow setting is displayed
must
in this case,
viewrow is
for
INSERT,
Viewrow option, press
screen. It
prompts-
5
be between 0
each
window by a formula based on
the
legal values
the
terminal
the
and
Therefore,
if
you
attempt
XCHANGE
V.
the
cursor
the
text
are
length divided
WINDOW
This
to
FORTRAN
to set
option allows you to select a viewrow
the
right
to
be positioned by
size
-I.
the
message line
0-22.
command,
tabs
should be 6,} 0, not
an
illegal tab.
of
the
colon. Type
the
If,
for example, your screen size
and
by
5, which means 5 on most
the
view row is
the
current
the
VIEW
the
prompt
determined
view row
number
command.
line).
and
the
3-22
Errors.
-1.
size
hbad
View row" is displayed
if
viewrow is set
to
a value
greater
than
text
AEDIT -86 User's Gaide
Editing Commands
Related Commands. VIEW,
3.23
The in the text. This command also displays the hexadecimal values the
HEX Command
HEX
command allows you
message line.
WINDOW
to
insert the
ASCII
equivalents
of
3.23.1 Description
Press
H;
AEDIT-86
I;
AEDIT
value:
Output
HOM
character
I n
put
To
specify a subcommand, press the initial letter
Input
Press
- - - - <
Hex
The
last values entered for input values consist string has the following characteristics:
Every
Contains 1
prompts-
-86
prompts-
E)
tor
of
one or more strings separated by one
is
a valid hexadecimal digit
or
an even number
e - e d i t
HEX
input
are
of
characters
of
displayed
(0-9,
that
subcommand.
to
the right
A-F)
or
hexadecimal values
of
text contents in
of
the colon. Legal
more blanks. A legal
Values entered character. The values may be separated
The
following are examples
are
regarded as hexadecimal; therefore, the suffix H
of
legal input values:
9
5A5B60
3456 65 78FO 8
If
the input
position. Error.
returns to main command level.
Output
Press O. The
hexadecimal value position gives hexadecimal values can be displayed displayed, the message
Press the space AEDIT
is
legal, the equivalent characters are inserted
"invalid hex value"
is
displayed on the message line. The count that preceded the
the
number
-86
of
bar
to
the
main command level.
98C8A 7
is
displayed if an illegal value
of
the
character
bytes to be displayed
"hit
space to continue"
and the next
10
by
one or more blanks.
in
the text at the cursor
is
entered, and the editor
immediately to the right of
in
hexadecimal format.
in
the message line.
is
displayed.
bytes
are
displayed. Any other key returns
If
more bytes are to be
is
the
actual cursor
HEX
Up
to
10
an illegal
command
bytes
of
3-23
Editing Commands
3.23.2 Examples
Example 1
To insert the form-feed character (hexadecimal value
OC)
to the current location,
type-
~
lEX)
Example 2
Input)
To insert the digits
lEX)
Input)
<RETURN>
1,
2,
and 3 to the text,
313233<RETURN>
type-
Position the cursor over the one and type 3 H(EX) O(utput) to display the charac-
on
ters. The characters are displayed
3.24
The
QUIT Command
QUIT
command performs several functions depending ends the editing session, it initializes processing a edited file, etc.
QUIT
has different prompts depending
has already been specified for the file
the message line.
new
you
are editing.
on
its subcommand.
input file, it updates your
on
whether or not a filename
3.24.1 Filename Specified
Assume
you
are editing a file with a filename already specified.
It
Press
Q; AEDIT-86
- - - - E d i Abort
tin Exit
prompts-
9 input file
Init
[t
0 output file]
Update
Write
To specify a subcommand, press the initial letter of that subcommand.
Abort
To execute the Abort subcommand, press have been made to the current avoid inadvertent
loss
of text. A y continues the abort process; the same procedure
file,
AEDIT-86 prompts "all changes lost? (y or [n])"to
A.
When Abort
is
activated, if any changes
then applied to the secondary file. Control returns to the operating system only after both questions have been answered with
lost.
If
the input file(s) are
either question
AEDIT-86 returns to main command Note
that-
You are questioned concerning only input files
The first question
(if
any) relates to the current file and the second one
y. All changes (if any) that were made to
is
answered with a response other than y,
level.
that
have been changed.
(if
any)
relates to the secondary file.
If
you answer y to the first question and n to the second while AED IT -86
you
type
QUIT
active, the next time the file about which
Abort,
you
have already answered y unless
you
will not be asked further about
new
changes have been
is
still
made.
is
3-24
AEDIT -86 User's Guide
Exit
To
execute
current
cally performs the returns response
In
it
To
execute the Init subcommand. press I.
without returning to current
Press
I;
the
Exit subcommand, press
file. Then,
AEDIT-86
other
than
if
the
secondary file has also been changed,
OTHER
to
y
the
command and asks
the
operating system without rewriting the secondary file. Any
return~
the editor to main command level.
operating system.
E.
When activated,
"all
It
allows you to
If
any changes have been made to the
file, the menu prompts uall changes lost? (y
AEDIT-86
prompts-
AEDIT-86
AEDIT-86
changes lost? (y
start
or
(n])".
Editing Commands
rewrites the
automati-
or
[n»".
A y
editing a new file
----
enter
Enter name the viation exists. These controls
Update
To file without returning
After
After
level, not
Write
To
The
---­Output
<HOME>
[file
the
input file
or
by the VO or
output
of
FOR
file, VO
execute the
the
file has been written, the message
completing the
at
main command level.
to
re-edit
[TO
file
(or < RETURN)
FO
controls. File
is
the
abbreviation
WARDONL
are
described
Update
subcommand. press U. It writes the updated version
to
the operating system.
QUIT
Y.
The
Update
I
in
execute the Write subcommand, press W.
following prompt
<HOME>
file:
is
to
displayed-
re-edit
VO I FO
]]:
) followed optionally either by an output file
is
the file you want to edit,
of
the
control
TO
option can be used only when
Chapter
"file
command, the editor
VIEWONL
4.
has been written"
is
at
Y;
the
TO
FO
is
file indicates
is
the
the
input file
displayed.
QUIT
abbre-
of
your
prompt
Enter
the output filename.
ing question is displayed:
overwrite
If
y, the entire text file is written to the named file overwriting the existing file.
AEDIT-86
Any
After
the
The
QUIT
<
ESC)
other
existing
returns to
response returns the editor to the
file has been written, the message ""file has been written"
prompt
is
always reissued
or < CTRL-C)
If
the specified file exists, the editor beeps and the follow-
file?
the
QUIT
to
return to main command level.
Cy
or
prompt level.
after
an
Update
[n])
QUIT
Write
or
Write
prompt level.
is
displayed.
subcommand. Press
3-25
Editing
COlDlDands
Note
that:
QUIT
the
Write
An output file indicated by the invocation line or
and Exit relate to this output file; Write does not.
Abort and
current file and the secondary file.
relate only to the file you are currently editing.
QUIT
at
the
Exit relate
TO
QUIT
Init command. Only the subcommands Update
AEDIT·86 User's Guide
to
the entire AEDIT-86 session, i.e.,
QUIT
clause can be specified for a file in either the
Init,
QUIT
Update, and
to
both
QUIT
3.24.2
If
Update subcommands are not available (both subcommands require a filename). The AEDIT-86 prompt
----
Abort
The
3.25
To more nonempty lines preceeded by and followed by an empty (or blank) line. The PARAGRAPH left and right margin in the
or
word is defined as· a sequence tab, line feed,
Filename Not Specified
you
are
editing a new file and have not yet specified a filename,
is
altered as follows:
no
input
subcommands function the same as discussed above.
PARAGRAPH
invoke the
adjusting the words within a· paragraph between the right and left margins. A
The
ning
line; then, the end empty line. This implies will process the entire file as one paragraph, wherever the cursor positioned in the file.
PARAGRAPH
or
PARAGRAPH of
the current paragraph. AEDIT-86 searches backward for an empty
f11e
In1t
W r 1 t e
Command
command, press
command reformats a paragraph using the values set for indent and
SET
Margin command. Reformatting means rearranging
of
characters surrounded by white spaces (i.e., space,
carriage return). The default
NOTE
command execution starts
of
the paragraph
that
if your file has
P.
A paragraph
is
to reformat one paragraph.
by
indentifying the begin-
is
found
by
searching forward for an
no
empty lines,
the
Exit and
is
defined as one or
PARAGRAPH
is
currently
3-26
3.25. 1 Description
Move the cursor to any position Press P; AEDIT-86
F 1 I I
To Count. Count defines the number
Related Commands.
Fill
Press F
one blank, and every blank after a sentence terminator (e.g., period, question mark)
is
extended to two blanks. Words are moved to fill the line between the right and left
Justify
specify an option, press the initial letter of
to
perform filling. This means that the white space sequences
prompts-
SET
in
Margin
the paragraph to be reformatted.
that
option.
of
consecutive paragraphs to reformat.
are
reduced to
AEDIT
-86 User's Guide Editing Commands
margins value and lines
Justify
Press J to perform justification. The (if line ends The
3.26
To the and prompt sections. The of may, for example, view errors in a listing file file in the editing commands.
The size is less than five rows, the screen is displayed. the
or
from line to line
of
indent. Words are moved to the left as much as possible. Words
are
not right-justified.
second step
necessary), and
at
last line
is
performed separately for each line: words are shifted to
the
the right margin and the spaces between words are approximately even.
of
the
paragraph
if
necessary.
The
space between words expanded
is
not right-justified.
The
first step
first line is indented according
is
as described in the filling process.
so
that
the last word
are
WINDOW Command
invoke the
screen into two partitions. Each partition or window contains the text, message,
the same file or two different files, using
screen
two windows.
WINDOW
other
window.
is
split above
After
command, press W.
WINDO\V
The
existence or absence
You may think
the
cursor row.
the
screen
is
split. pressing W causes the cursor to
It
splits (horizontally) the text area
command allows you to view two different parts
the
main file and the
in
one window and correct
of
windows does not affect the
of
each window as a narrower screen.
If
the cursor
is
not split, and the message "window too small"
is
placed so
OTHER
that
one window's
jump
the
to
the
not split
the
right
of
every
of
file. You
source
between
At
any given time, only one window
When the screen separately for each window by a formula based on the current view row and the window size.
If
the
same file
in the other window until you press
To
return to viewing one screen, see the
Related Commands.
3.27
To The
is current position. file when the This mechanism is indifferent or
KILL_
invoke
given, the
not.
the
current (active) window
is
split using the
is
displayed
KILL_
WND
KILL_
current
KILL_
WND
window
If
the file displayed
WND
in
WND,
Command
command, press
is
is
command
is
active-the
WINDOW
both windows, a change
Wand
the dominant one. When the
extended to
to
whether the
jump
KILL_
SET
Viewrow,
in
the current window
is
given, it scrolls upward
window containing the cursor.
command,
in
to the other window.
WND
command.
VIEW
K.
It
returns the screen to one window.
fill
the screen;
t'Yo
windows display two different files
the
view row
one window
KILL_
the
cursor remains
is
at
the
to
fill the entire screen.
is
determined
is
not reflected
WND
command
beginning
in
of
its
the
Related Command.
WINDOW
3-27
Editing Commands
- AEDIT -86 User's Guide
3.28
To invoke the CALC command, press
CALC Command
3.28.1 Description
Press C; AEDIT-86
---­Cal
The last statement entered under the
the
This command
3.29
To
<HOME)
c :
colon.
EXECUTE Command
invoke the
prompts-
to
is
described
EXECUTE
re-edit
in
detail
command, press
3.29.1 Description
C.
It
CALC
in
Chapter
provides
command
7.
E.
EXECUTE
you
with computation capabilities.
is
displayed to the right of
is
used to execute Macros.
Press
E;
AEDIT-86
----
Macro
The last macro name entered for this command
When typing the macro name
This command
Related Command.
3.30
To invoke the
<HOME)
name:
MACRO Command
prompts-
to
is
described
SET
MACRO
re-edit
is
completed, the specified macro
in
detail
in
Chapter
Display,
command, press M.
SET
Go
It
3.30.1 Description
Press M; the menu
Create
Get
prompts-
Insert
List
Save
is
displayed to the right of the colon.
is
executed.
5.
is
used for manipulating macros.
3-28
To
specify a subcommand, press the initial letter
of
that subcommand.
,
When a macro file is specified in the invocation line (explicitly or implicitly), it read and processed immediately after AEDIT-86 invocation. This has the same effect as using a
MACRO
Get
as
the first command after invocation.
is
AEDIT -86 User's
Guide
Editing
Commands
Macro
Chapter
Related Command.
files are described
4. SET
Go
in
Chapter
5;
AEDIT
-86 invocation
is
described in
3-29
CHAPTER 4
This
chapter
FORWARDONLY,
BATCH.
describes
VIEWONLY,
AEDIT
-86
invocation
RECOVER,
4.1 Invocation
Invocation details for a particular system are given the syntax used to invoke
[ device) A E D I T
[ recover] [,
othe,-inpuLfile T 0 other _output file I
[ execution_mode]
where
input file
output file
other input file other output file
file processing mode
recover execution mode
AED
IT -86:
[inpuLfile
] T 0 outpuLfile I file processing_mode ]
is the file you want to edit.
is
a new file command.
is the name the
file you are editing if an output file written when you call either the input file, an output file cannot be specified.
supply filenames for the
[VIEWONL [FORWARDONLYINOFORWARDONLY]
[RECOVERINORECOVER] [
MACRO
[
MACROSIZE
[
BATCH I NOBA
created.
of
VIEWONLY
Y I
[ ( macro_file) ] I
It
is
the output file.
or
FORWARDONLY
NOVIEWONLY
(macro_buffer_size) ]
TCH
AEDIT
and
MACRO,
in
the appendixes. Following
file
If
named when you call the
QUIT
OTHER
]
-86
the
AEDIT
processing_mode
a file name
It
is
the destination file for
Update or
buffer.
]
NOMACRO
-86
MACROSIZE
is
not specified,
is
specified.
QUIT
is
]
INVOCATION
controls:
and
is
QUIT
It
is
Exit.
If
specified for
A comma
4.
1. 1 Invocation Line Examples
Example 1
AEDIT-86 can be invoked simply by naming the file you want to edit, as follows:
Example 2
This example shows invoking AEDIT-86 with a main input file, an file, and a macro file:
is
used to separate the main filename from the
OTHER
filename.
OTHER
input
4-1
AEDIT -86
Ia.ocatioa
Example 3
The
OTHER
the controls OTHER
~=:-
If
not behaves
4.2
following example shows an invocation
of
AEDIT
-86.
The
main input file and
input file have the same filename but different filename extensions. The
MACRO
filename can
P~=G.SR>LS~
and
MACROSIZE
be
shortened using a hyphen (-), as follows:
vIE
...
O~'LV
are also specified. The main filename and the
I"CEATCH
MACRO{FROG.MAC)
NOTE
the
TO
option
is
used and the input file does not exist, then the
"File
exist" message is displayed following the invocation line, and AEDIT-86
as
if no input or output values were specified.
Invocation Controls
AEDIT -86 User's Guide
MACROS:ZE(1024)
does
AEDIT-86 recover control, and execution mode controls. Table tion controls. The remainder
The
ONLY
controls can be divided into three groups: file processing mode controls,
4-1
lists the AEDIT-86 invoca-
of
this chapter explains each control
processing mode for an input file uses the
VIEWONL
in
Y and
detail.
controls.
FOR
These controls can be specified for either the main input file, for the input file, or both. together for the same file. However, if either of them form, any combination is legal, e.g.,
A filename must be given
VIEWONL
if
either of these controls
Y and
FOR W ARDONL
NOVIEWONLY
Y cannot be specified
is
specified
FORWARDONLY.
is
specified in the positive
in
the negative
form in the invocation line.
Table
4-1.
AEDIT-86 Invocation Controls
Control Name
File Processing Mode Controls
FORWARDONL Y /NOFORWARDONL Y
VIEWONL Y /NOVIEWONL Y VO/NOVO
Abbreviation
FO/NOFO
Default
NOFO
NOVO Enables fast viewing of
Meaning
Enables faster editing of large files, but the size
of
the edited file
limited.
large files;
allowed.
no
W ARD-
OTHER
is
'.
changes
4-2
RECOVER/NORECOVER
MACAO/NOMACRO MACAOSIZE
SATCH/NOBATCH
Recover Control
RC/NORC
Execution Mode
MR/NOMR MS
BA/NOBA
NORC
Controls
MR(root.MAC)
MS(3072) Allocates macro buffer
NOSA
Enables struction.
Specifies macro file.
size.
Activates AEDIT -86 non-interactive mode; used activated command file.
if
file
AEDIT
recon-
-86 is
from
in
a
AEDIT -86 User's Guide
AEDIT -86
In~ocation
When an output file negative form, e.g.,
VIEWONL fied under
The
processing mode for the main input file uses the
Y and
QUIT
This control may be specified only
is
specified, these controls may be specified only
NOVIEWONL
FOR W ARDONL
Y.
Yare
the only controls that can be speci-
Init.
RECOVER
in
the invocation line and only for the main
control.
in
their
input file.
The execution mode uses the
MACRO,
MACROSIZE,
and BATCH controls.
These controls may be specified once per AEDIT-86 invocation. They cannot be specified for a particular file, and they cannot be specified under
A control may be specified only once, except for DONL OTHER
Y, which may be specified once for the main input file and once for the
input file.
VIEWONL
QUIT
Y and
Init.
FOR W AR-
4-3
AEDIT -86 Invocation AEDIT -86 User's
Guide
4.2.
Syntax
FORWARDOtiLY I tfOFORWARDOHLY
Abbreviation
[HOlFD
Default
HOFORWARDOHLY
Control
Processing mode for an input file
Description
FOR W ARDONL AEDIT-86 the
current
1 FORWARDONL Y
Type
Y allows much faster editing of large files because it instructs
to
allocate a fixed amount
amount
of
memory allocated, some text may be lost. This loss applies only to the
editing
of
the file; the original file
of
memory for the file.
is
not affected.
If
the file
is
larger than
FOR W ARDONL input file. FORWARDONL FOR W ARDONL
While the Forward.
Error. is
displayed, you are unable to execute
may execute
FOR W ARDONL
FOR W ARDONL
"some
Y can be specified for either the main input file or the
Y can also be specified under the Y cannot be specified simultaneously with Y is in effect for the input file, an output file may not be specified.
Y control
text lost"
QUIT
is
displayed if text
Write.
QUIT
Init command.
VIEWONL
is
in
effect, the message line displays the word
is
lost during the current edit.
QUIT
Update
or
QUIT
If
Exit; however, you
OTHER
Y.
When
this error
4-4
AEDIT
-86
User's
Guide
AEDIT -86 Invocation
4.2.2
Syntax
VIEWOHLY
Abbreviations
VIEWONL Y
HOVIEWOHLY
[HOlVO
Default
HOVIEWOHLY
Control
Processing mode for an input file
Description
A large file, e.g., a large listing file
much
VIEWONL
VIEWONL file. cannot be specified simultaneously with is
Type
that
you do not want to change, may be viewed
faster
VIEWONL
in
effect for the input file, an output file may not be specified.
using
the
VI
EWON
Y if you want to be certain that
Y can be specified for either the main input file or the
Y can also be specified under the
L Y
control.
FORDWARDONLY.
It
no
changes are made unintentionally.
QUIT
is
also
an
Init command.
When
advantage
OTHER
VIEWONL VIE\VONL
to
input
use
Y
Y
If
the
VIEWONL
following
(DELCH),
The following commands are still displayed on the prompt line; however, they are not valid INSERT, Update,
All
other
portion
While the
Error.
function
with
VIEWONLY:
MACRO
QUIT
commands are legal. Note that you may save a
of
it using the BLOCK Put command.
VIEWONL
"illegal
Y control is specified, the input file
keys
are
not
valid with
(DELL),
Write, and
command"
(DELR),
(?)REPLACE,
Insert,
XCHANGE.
Y control
is
(DELLI).
BLOCK
MACRO
is
displayed if an illegal command
in
Save,
effect,
the
may
not be changed.
VIEWONL
Delete,
PARAGRAPH,
message line displays the word View.
Y:
(RUBOUT),
GET,
HEX
QUIT
VIEWONLY
is
given.
Exit,
The
Input,
QUIT
file or a
4-5
AEDIT -86 Invocation AEDIT -86 User's Guide
4.2.3
Syntax
RECOVER I HORECOVER
Abbreviations
[H01RC
Default
HORECOVER
Control
Processing mode for the main input file on invocation
Description
The
RECOVER system of
an
If
a crash occurs, reinvoke AEDIT-86 with the
control can be specified only for the main input file and only in the invocation line.
RECOVER
Type
error
occurs during AEDIT-86 operation or if an unintentional termination
AEDIT
-86 session occurs using
option can be used to help you reconstruct edited files if a fatal
QUIT
Abort.
RECOVER
control. The
RECOVER
When
RECOVER
input file.
structed.
identify, gather, and connect RECOVER
activation is the same as
RECOVER
environment. The
it
is
case does not reflect the entire file contents.
If
an input file is specified, the input file is not read when RECOVER
but it serves as an output file for the
If
RECOVER
reconstruction process
spilled to extra memory
is
specified, AEDIT-86 takes the entire memory contents as the
the memory contains previously edited file(s), your file must be recon-
is, however, only a means for the
the
relevant text portions in memory. may be used only is probably useless on virtual-memory-based systems or
if
the memory allocated
that
used
in
the previous activation. This implies
is
difficult or impossible if the edited file
or
to temporary files. The memory content
QUIT
Update command.
reconstruction-you
to
AEDIT-86
in
the current
in
a multitask
is
so large
in
is
in
must
that
that
such a
effect,
4-6
AEDIT -86 User's Guide
AEDIT
-86 Invocation
4.2.4
Syntax
(II
A C R 0 [ ( macro_file ) 1 I H 0
Abbreviations
[H01!WIR
Default
!WI
A C R 0 ( A E D I T _filename.
Control Type
MACRO
!WI
Execution mode
Description
The
MACRO invocation. Not specifying this control
When the
extension.
control allows
The
NOMACRO
MACRO
The
control is specified with a filename, the filename can have any
subject of macro files
you
to specify a macro file for the current AEDIT-86
option prevents AEDIT-86 from reading a macro file.
or
just specifying
!WI
A C R 0
A C )
MACRO
is
more thoroughly described in
is
equivalent
to
the default.
Part
II.
4-7
AEDIT -86 Infocation
AEDIT -86 User's Guide
4.2.5
Syntax
MAC
Abbreviations
MACROSIZE
R 0 S I Z E ( macro_buffer _size )
MS
Default
MACROSIZE
Control Type
Execution mode
Description
This control batch operation if many thoroughly described in
or
(
3072
is
useful to allocate more macro buffer space if, for example, a huge is
implemented using macros. Also, more macro space may be required
long macros are used. The subject
)
Part
II.
of
macros and macro files
is
more
MACROSIZE AEDIT-86 of
bytes
to formal maximum allowed The maximum size actually allowed also depends therefore, it may be less than the formal maximum.
Buffer large macro buffer
that
allows you
invocation. macro_buffer_size
be allocated.
is
allocated for macros
is
not recommended.
to
specify
The
minimum macro_buffer_size
is
32767
(8000H)
is
not available for text; therefore, allocating a
the
macro buffer size for the current
is
a decimal number specifying the number
bytes. The default size
on
the
is
1024
amount
(400H)
is
of
RAM
bytes; the
3072 bytes.
available;
4-8
AEDIT
-86
User's
Guide
AEDIT -86 Invocation
4.2.6
Syntax
BATCH I HoBATCH
Abbreviations
[HolBA
Default
HoBATCH
Control
Execution mode The
BATCH from a command file. When except
Although a semi-batch mode where input example, however,
BATCH
Type
control
the
MESSAGE AEDIT-86
in
this mode
AEDIT-86
is
used to activate
line.
may receive input from the console
yes/no
still waits for the answers.
AEDIT-86
BATCH
is
is
in
from the keyboard). this
questions (e.g., "ok to replw;e?") are suppressed;
effect,
in
a noninteractive mode, usually
AEDIT-86
suppresses
in
BATCH
is
mode (implying
not recommended.
al1
output
For
Activation
If
AEDIT-86
The
executing
Example
the following command file:
AEDIT EXAMPL.SRC
with
sequence
AEDIT-86
1.
BATCH Control
is
invoked from a command file,
of
commands and
interactively. Input
If
you want to change dog to cat throughout your file, you can create
characters
al1
should be exactly the same as if you were
is
echoed
BATCH
IRdog<ESC>cet<ESC>QE
where
is
EXAMPL.SRC
/R
QE
<
ESC)
the < HEX) Example
are
<
If)
To EXAMPL.MAC. configuration command be ignored (configuration commands are described would set
is
inserted
function key under
2.
The
text
read as part
is not and generates an error message.
avoid
AFIG=ODOA.
of
this
problem,
This macro file disables the
the input file. means replace all occurrences. is
the
QUIT
in
the command file using the
in
example 1 was entered on one line because <
the command input sequence. <
an
AFIG.
Exit command.
INSERT.
AEDIT-86
The configuration command
macro
character
input is from the command file.
to
the system console.
HEX
Input command or using
cr)
and <
If)
cr)
is
a legal command but
file
may
be
pair < cr) < If)
AFIG
in
Chapter
created,
sets characters to
9).In this case, you
e.g.,
with the
4-9
AEDIT
-86
IavocatiOD
AEDIT -86 User's Guide
In this example, the following command file may be used:
AEDIT
EXAMPL.SRC
BATCH
MGEXAMPL.MACcESC)
IRdogcESC)cetcESC)
QE
where
EXAMPL.SRC MG EXAMPL.MAC
jR
QE
Example in Chapter 5), the command file requires only two AEDIT-86 commands. In this example, given a macro with the required operation sequence called macro file called
AEDIT
3.
If
all operations are defined
EXAMPL.SRC
is
the input file.
is
the
MACRO
is
the
macro
AFIG=ODOA. means replace all occurrences. is
the
QUIT
PASSl.MAC,
file containing
Exit command.
the command file
BATCH
Get command.
the
configuration
in
a macro (creating macro
is
as follows:
command
files
is
described
PASS} and a
MGPASS1.MACcESC)EPASS1cESC)
where
EXAMPLE.SRC MG
PASSl.MAC
E
PASS}
is
the input file.
is
the
MACRO
is
the macro file.
is
the
EXECUTE
is
the file containing the operation sequence.
Get command.
command.
4-10
AEDIT
-86
User's
4.3
The default.
Guide
Various
BATCH
SA
TCH Modes
control can be either BATCH or NOBA
The
activation source can be either the keyboard
TCH.
or
NOBA
a command file.
AEDIT -86 Invocation
TCH
is
the
NOBA with input from a submit file tions, keyboard, are seldom used.
4.4
input file detected, an error message banner
where:
4.5
TCH
with input from the keyboard
NOBATCH
Banner
When AEDIT-86
(if
any), clears the screen, and enters main command level.
is
displayed:
system-id A E D I T V x.y
system-id x.y yyyy
Work Files
with input from a submit file and BATCH with input from the
is
invoked, it reads and processes the macro file
is
is the busy/waiting indicator.
is
supplied by the operating system.
is
the AEDIT-86 version number.
is
the
is
the usual interactive mode.
is
the usual batch operation.
displayed on the message line. Otherwise, the following
Cop
y r i 9 h t yyyy I n
copyright year(s).
The
remaining combina-
(if
tel
Cor
BATCH
any), reads the
If
an error is
p •
The
fiJe
:WORK:
that
any
I/O
that
sure the appendixes.
:WORK:
is
used by AEDIT-86 as a predefined fiJename. AEDIT-86 assumes
operation to this file
is
available. System specific information
will
be successful.
It
is
your responsibility to make
on
:WORK:
is
given in
4-11
Part
II
describes the more advanced uses commands usage of
AEDIT-86,
and
macro files,
of
AEDIT-86. In this
AEDIT-86
and configuration commands
variables, the
are
explained
CALC
PART
part,
the
macro
command, advanced
in
detail.
II
Chapter create and use them. Macros, sequences given a name, are typically used for command sequences
Chapter that
Chapter CALC rotate
Chapter the
Chapter commands for the Series III and Series IV systems and terminals.
5,
"Macro
6,
"AEDIT-86
you can access.
7,
"CALC
command expression can include logical operators, relational operators,
operators, and arithmetic operators.
8, "Advanced
CALC
command and
9, "Configuration
Commands,"
Variables," describes the set
Command,"
AEDIT-86
AEDIT-86
discusses the manipulation
of
describes the
Usage," describes writing macros
variables.
Commands,"
gives the characteristics and configuration
commands
of
CALC
of
macros and how to
that
have been collected and
that
are
executed often.
local and global variables
command's capabilities. A
shift/
that
incorporate
th!!
DEC
VT100 family
of
CHAPTER 5
MACRO COMMANDS
AEDIT-86
that
Macros entering a series command errors associated with long command sequences.
A set
all macros in
Macro commands, and comments.
AEDIT-86 command defined interactively using
Insert.
Macros entered as 86 command codes are listed later in this chapter.)
macros are sequences
have been collected and given a name.
are typically used for frequently executed command sequences. Instead
of
commands, you can call a previously created macro to execute a
sequence automatically. Macros speed your work and reduce the typing
of
macros may be grouped
that
file
are
available for execution.
files contain macro definitions and may contain configuration commands,
enables you to create macros interactively using the
or
directly using
MACRO
are stored
is.
in
macro form. When you create a macro, letters and digits are
Function keys
<
DELR)
is
of
AEDIT-86
in
a macro file. When you "'get" such a macro file,
the
MACRO
Create, and corrected or changed using
are
stored
stored in its macro form.
Insert command. Typically, macros are
in
a special format: for example, the AEDIT-
commands (sequences
MACRO
in
this case,
of
keystrokes)
MACRO
\XA.
of
SET
Create
(Control
5. 1 MACRO Command
The
MACRO
macros.
A
Macro defined by writing macros to your macro file using the inserts text must write them to a separate macro file is used to get a macro file,
in
5. 1. 1 Description
Press M; AEDIT-86
Create
To
specify a subcommand, press the initial letter of
Create
The Create subcommand "creates" a macro interactively by accumulating a sequence of
keystrokes. The macro is executed and created concurrently.
command
definition
two ways: interactively. by using the
in
macro form automatically.
Get
is
is
a series
thus
prompts-
Insert
invoked
by
pressing M, which allows you to manipulate
of
commands written in macro form. Macros can be
To
in
macro form. The
making the macros
Lis
t
MACRO
save interactively defined macros. you
Create command, or directly,
MACRO
it
contains available for execution.
Insert command, which
MACRO
Get command
Save
that
subcommand.
5-1
Macro Commands AEDIT -86 User's
Guide
Press C; AEDIT-86
----
Macro
The name
EXECUTE
followed by <
A macro name can consists 60
After you type the macro name, the word and remains there until the macro definition
main command level, and the entire set
MACRO
All subsequent keystrokes are executed ""remembered" or htrapped" definition, including special keys like < for the current activation; however, they are also inserted into the macro definition. The macro is terminated by typing one
<CTRL-C)
M (main level only)
<HOME)
name:
of
(if any)
characters.
Create.
prompts-
to
re-edit
the last macro specified for
is
displayed to the right
ESC)
The
or < RETURN).
of
either a single character or a character string
macro name may contain any characters, e.g.,
by
the editor. These keystrokes constitute the macro
Terminates the macro
Successful termination
is
MACRO
of
the colon. Type
"Macro"
is
of
AEDIT-86 commands
in
the ESC) of
the following characters:
MACRO
deleted.
is
complete. Then AEDIT-86 returns to
regular manner, but they are also
and <
HEX)
mode without defining the macro;
of
macro definition.
Create,
displayed
MACRO
in
the macro name
+,
6,
on
the message line
is
now
, which behave as usual
Save
or
of
up to
a.
available for
By
defining a single-character macro,
EXECUTE
Following next occurrence of the last target string:
II<ACRO)
Macro
command later
is
an
example
Ireate)
name: " .....
in
this chapter).
that
interactively creates the macro dot
i·~~~ib·
you
are able to configure keys (see the
(.)
Mi'iU;'
Following to
mean
Error. the amount of memory allocated to macros. In effect, the definition and the current incomplete macro definition
Get
The
is
an example that interactively creates a macro to configure <
"jump
to start
"no
more room for macros"
Get subcommand gets a macro file. This means
The
macro definitions
The
configuration commands
The
SET
commands
The
macro comments in the file are ignored.
of
line."
is
displayed
in
the file are available for execution.
in
the file are executed.
in
the file are executed.
on
is
deleted.
the message line, if macros exceed
that-
that finds the
CTRL-L
is
terminated,
)
5-2
AEDIT -86 User's Guide
Macro
Commands
Macro The
macro in the new set has the same name as a macro already available, the new macro overrides the previous one. Configuration commands and
Press G;
---­t-lecro
The
Edit the macro filename, if required, then press < You
G(et) < RETURN)
file. When
this file 86 changes the invocation file extension to < ically. This means macros able for execution.
Error.
The error
files
are
described later
new macro definitions are added to the current set
AEDIT
<HOME)
-86
prompts-
to
re-edit
in
this chapter.
SET
file:
name of the last macro file read (if any)
may
insert
AEDIT
is
taken from the macro control or,
in
it. However,
Any
of
is
displayed, the area causing the error
an
empty
to instruct AEDIT-86 to
-86
is
invoked, the editor processes the initial macro file. The name
that
you
you
the errors listed
string
do not have to get the default macro file to execute the
must get any other macro file before its macros are avail-
in
Section B.4 may be issued during a
is
displayed to the right of the colon.
RETURN)
as a filename by
""get"
the present text buffer
if
this control
root)
.MAC and processes it automat-
is
skipped, and processing continues.
of
available macros.
commands are executed.
.
typing
is
not specified,
M(ACRO)
as
a macro
AEDIT-
MACRO
If
of
Get.
a
Related Commands. The invocation controls
MACRO,
MACROSIZE
In8ert
The Insert subcommand causes all subsequent input, including function keys (e.g.,
<
ESC) < RUBOUT)
It
is
used to change and correct macro files. For example, if
MACRO
definition may then be saved
typing < Press I; AEDIT-86
Control
In
MACRO
keys such as < their macro codes.
When <
Type <
Insert, the character sequence
CTRL-C
C
to
Insert, all keys are entered as is (e.g.,
HEX)
RETURN)
return
is
used to break macro definitions into more readable lines. Therefore, you
must type
If
the backslash the backslash to terminate the macro or
CTRL-C)
\NL
) to be inserted
) .
prompts-
in
a macro file. This command
in
\CU
stop
or <
ESC)
The
following are exceptions:
is
typed, it
if <
RETURN)
is
not a lead-in character, it must
is
not doubled when it
to terminate
do not perform a function but are inserted as
is
not converted to
is
required in the definition.
is
\NL
for <
RETURN)
MACRO
the text
typed, which enables you to type
Insert mode.
in
macro form and not executed.
you
press <
i$
inserted
F(lND)
be
in
the text. The macro
is
terminated only by
is
entered as F). Thus,
\NL
because the carriage
entered twice
.
(\
\).
UP)
in
However,
\MM
Example. The following macro defines < (Remember
that
what you type does not execute
CTRL-L)
but
to mean
is
inserted
jump
to start of line.
in
macro form.)
(end
macro)_
5-3
Macro
Commands
The
M\OOC\BR\CR\CL\CH\MM
MM
List
The
able macros. line,
any
Save
The
definition
or to translate and display
Press
following text
terminates
List subcommand displays on the message line the names
the
message
other
character
Save subcommand translates an available macro
at
saved in a macro file.
S;
AEDIT-86
is
inserted into filename:
the
macro definition (see also Section 5.3,
If
there
are
more macros available
"hit
space to continue" is displayed. Press the space
returns the editor to main command level.
the current position
If
you want to look
the
macro, review it, and delete it
prompts-
than
can be listed on
to
macro form and inserts
in
the text. The macro may subsequently be modified
at
a macro definition, use
uMacro
of
(if
desired).
AEDIT -86 User's Guide
Modes").
all currently avail-
the
message
bar
to continue;
the
MACRO
Save
---­Macro
The EXECUTE)
<
cursor location in macro form.
You may use the following procedure to save a new, interactively created macro for future use:
1.
2.
3.
4.
5.
5.2
To
command. Type
IACRO)
<HOME)
to
re-edit
name:
name
of
the last macro specified (for
is
displayed to the right
ESC)
or < RETURN) . If
Press 0 to Use Specify the macro filename when prompted. Insert the macro in macro form using the
Update
enter
the
the
QUIT
Init command to invoke your macro file.
the modified macro file using the
the macro exists, it
OTHER
of
the colon. Type a macro name followed by
buffer.
Deleting Macros
delete a macro from
the
I<reate)
the
following:
~acro
set
of
available macros, use the
name_<ESC)(CTRL-C)
MACRO
is
MACRO
QUIT
Update or
Create,
inserted
in
Save command.
MACRO
the text
QUIT
MACRO
Save
or
at
the current
Exit command.
Create
5-4
where
of
is the name
This procedure does not delete a macro from a file, you should edit the macro file like any other file,
the macro
to
macro
be deleted.
file.
To
and
use
delete from a macro
the
delete commands.
l\EDIT
-86 User's Guide
5.3
Macro Modes
A
macro macro form). All macros created with may be
Any modeless either
INSERT
A modeless macro INSERT command macro, it executes as restores
may
be
either modeless
form) or non-modeless
created
the
using
or
non-modeless
or
or
XCHANGE
level and in
mode (e.g.,
MACRO
XCHANGE
is
independent
mode. INSERT if
it is
XCHANGE)
(terminated
(terminated
MACRO
Insert
or
macro modes.
or
at
main command level. When it finishes execution, it
may
of
whether it
This
allows you to use
XCHANGE
that
with
\MM
after
it
is
converted
with
\EM
after
it
is
converted
Create are modeless. A non-modeless macro
by
editing a saved modeless macro.
be
used
at
main
command
is
called from main
the
same
macro
mode. When you execute a modeless
was in effect when it was activated.
to
level
command
at
the main
Macro
to
macro
or
in
level,
Commands
A non-mode1ess macro is executed when the macro was activated. When the
mode
that
was in effect when mode determined by the macro. Non-modeless macros provide compatibility upgrading with respect
Modeless which it was executed. Non-modeless macro execution results usually depend on the
context (mode) from which they were caned.
macros whenever possible.
For
MA MB\BRi*\BR
The or
not it was called from main
the
The are main
example, the
( \
macro
example, compare the following macros:
\BRi*\BR
first macro
macro
second macro
the
same
command
BR)
causes
\MM
\EM
is
finishes, the initial mode
as for
level. But,
characters
the
to
AEDIT
execution always give
modeless.
is
non-modeless.
the
first; i.e.,
if
i*
are
editor to leave
at
the
AEDIT
the
macro finishes execution,
it
was activated. Instead,
V 1.0.
the
When
it
is
executed, the character *
command
the
the second
inserted into the text, and
level,
is
retained.
If
it is called from main command level, the results
character * is
macro
INSERT
-86 prompt level
same results regardless
It
is
recommended
INSER
is
mode and return to main
that
was
in
effect
it
does not restore
AEDIT-86
that
T. or
XCHANGE
inserted and the editor remains at
called from
the < ESC)
remains in the
of
the mode from
you use modeless
is
inserted whether
mode; when
INSERT
mode, for command
command
and
level.
5.4
EXECUTE Command
The
EXECUTE
In
macro
following questions/requests:
?Replace: QUIT
BLOCK
Uhit space to continue"
QUIT
In
the prompts listed above,
command requests a macro name and executes
execution all input
·'ok
to
replace?"
Init
or
QUIT
Abort:
Delete:
Write
"cannot
or
BLOCK
the
is
taken from the macro except for answers
"all
changes lost?"
save in memory, save
Put: ·'overwrite existing file?"
the
response to
the
anyway?"
prompt
is
taken from
specified macro.
to
the
the
console.
5-5
Macro Commaads
5.4.
1 Description
AEDIT
-86
User's
Guide
Press [count]
----
Macro
The name
EXECUTE)
<
ESC)
If
the busy/waiting indicator being executed. This may not be any other indication
The macro terminates when it has been executed the specified number of times or
failed.
Section 5.8 describes macro execution termination Macro activation may be nested up to eight levels. Type a < Errors
'''no such macro"
6'macro nesting too deep" eight levels.
Count. The
Related Commands.
E;
<HOME)
AEDIT-86
to
prompts-
re-edlt
name:
of
the last macro specified (for
is
displayed to the right of the colon. Type a macro name followed by
or <
RETURN).
CTRL-C)
EXECUTE
is
to force termination
is
SET
If
is
important
displayed if the macro specified does not exist.
is
command accepts any count.
Display,
MACRO
the macro exists, it
active, the prompt line displays
in
single-character macro execution where there
that
a macro
displayed if you attempt to nest macros to more than
SET
is
still executing.
of
macro execution.
Go
Create,
is
executed.
MACRO
-!!-
in
more detail.
Save, or
when a macro
is
5.5
Macros and AEDIT
When AEDIT-86 variables are referenced during ble value is fetched for the current activation of the macro, and a reference to this variable a primitive way to simulate passing a parameter to a macro. details.
5.6
You can write macros with single-character names. You can activate a single­character macro by simply typing its name if this character has the context from which it macro names are referred to as
Single-character macros can be activated
Using the
is
inserted into the macro definition. The use of AEDIT-86 variables provides
Single-Character Macros
EXECUTE
macros). By
pressing the macro character preceded by the <
By
pressing the key itself, if the key is "free," that
In
INSERT
following control characters also cannot be used as macros
<
CTRL-M)
(line feed). In main command levels: the same as for
the addition of all printable characters that are not used as AEDIT-86 commands (e.g.,
+,
and
XCHANGE
«
$, U, etc.).
RETURN»,
-86
Variables
MACRO
is
being activated. Single-characters
"free"
characters, e.g., L, U, Z, +,
in
the following ways:
command at main command level (as in the case for all
modes: all nonconfigured control characters. The
<CTRL-I)
INSERT
Create, the actual varia-
See Section 6.3 for more
no
other function
that
!.
MEXEC)
is-
«
TAB)
and
XCHANGE
),
and <
key.
can
be
in
this way:
CTRL-J)
modes with
used
as
in
5-6
AEDIT -86 User's Guide Macro Commands
(
MEXEC)
character
you
are
(
MEXEC)
A digit it
is
always interpreted
because the key's function overrides the macro definition.
The following INSERT
PROCEDURE
word editing a
time you type
This saves having to type out
is a configurabJe key (usually
macro, press
using
the
t converts
may
not be used as a single-character macro at main
is
or
XCHANGE
Pl/M
source file, you
<
CTRl-P)
(MEXEC)
macros
as
an example to demonstrate using a single-character
and
from
the
word
a count. A function key
mode. You can define a macro called
save this
the word
the
followed by
USEFUL.MAC
that
macro
can
call
word each time you want
(CTRL-E».
starts
"under"
in a file called
PLM.MAC
PROCEDURE
To
activate
the
macro name.
in
INSERT
the cursor to uppercase letters.
command
may
not be used as a
(CTRL-P)
PLM.MAC.
with
MACRO
will be inserted into the file.
to
insert it.
the
For
example,
mode,
level because
macro
macro
If
Get: then, each
single-
typing
name
as the
you
if
in
are
Errors
"illegal abbreviation, a decimal digit, or a macro name, at main command level.
··no such macro" or
exists.
command"
the <
is
MEXEC)
is displayed when you type a
displayed if the character following the
key
is
not a macro name; i.e., no macro with
character
that
is
not a command
EXECUTE
command
that
name
5.7
Macro Files
A macro file
Configuration commands
SET
Macro
Macro
Configuration commands specify the
Chapter
SET
commands
commands,
you to specify the mode AEDIT.MAC K_token Yes macro file, this command appears as
A macro definition ing format:
where
M
macro_name
\BR
characters_in_macro
\MM \EM
may
commands
definitions comments
9).
that
can be specified
to
if
you want the environment initialized to search for tokens only. In the
consist
are
the
"set"
is
a series
of
the
following:
only
commands,
in
a macro file. Including
of
operation.
your environment, you
of
commands written
declares
is stands for is signals the end signals the end of a non-modeJess macro.
that
any name given to the macro being defined.
the
macro contents.
host/terminal
with
For
example,
SKY.
a macro definition follows.
<
ESC).
of
a modeless macro.
characteristics (described
the
exception
if
may
include the command
in
macro form. It has the follow-
in
of
configuration
SET
commands allows
you use a macro called
SET
5-7
Macro Commands AEDIT -86 User's Guide
The following representations macro definitions.
Name \BR
\CL \CR \CU \CD \CH \NL \RB
\TB
\XF \XX \XA
\XZ
\XU \XH \XE \XN \XS
\Oh
\MM \EM
of
control characters and control codes
Represents
<ESC) <
LEFT)
<
RIGHT) <UP) <DOWN) <HOME) <RETURN) <
RUBOUT) <TAB) <
DELCH) <
DELL)
DELR)
< <
DELLI) <UNDO) <
HEX) <
MEXEC)
FETN)
< <
FETS)
Hexadecimal value End
of
End
of
Delete Character
Delete Left
Delete Right
Delete Line
Hex prefix character
Macro Execute
Fetch Numeric
Fetch String
of
a character modeless macro definition non-modeless macro definition
are
ased in the
The blackslash ( \ ) must appear twice if it is not used as a code lead.
A macro definition and configuration commands should be ended with either a semicolon (;) or < in a macro file, even within macro definitions. This allows you to split definition into lines so
Comments may be included in a macro file. A comment starts with a asterisk character pair ( \ characters, including carriage return and line feed, may appear following
,-
5.8
A command execution is marked
An attempt is made to move forward ( <
An attempt
A
is
this
Macro Execution after a Failure
or
(RETURN»
the
start
(-)FIND
cr). < cr)
that
an example of a comment:
is
B
comment
at
is
made to move backward ( <
of the file.
or
(?)REPLACE
and
(If)
(as opposed to
it
is
easier to read.
*)
and ends with an asterisk/backslash pair
\NL
and \OA) are ignored
-,
as
failed
if-
RIGHT), < DOWN), < HOME
the end of the file.
LEFT),
command fails to find the target string.
(UP),
the macro
hackslash/
(*
\).
in
the comment. The
or
(HOME)
All
)
) at
~
5-8
A command prefixed by a finite count is marked as failed if any of its thus marked.
(-)FIND
A
fails on its first execution.
or
(?)REPLACE
command prefixed by / is marked as failed only if it
eHCution
is
AEDIT -86
User9s Guide Macro Commands
A cursor movement command prefixed by /
If
the
SET
Go option
marked failed. When a command
tion is terminated, and control level,
AEDIT
execution continues with the
Example Macro
Macro
Macro
A value for (-)FIND
normally or because macro B failed, macro C
C is terminated, macro D
SET is successful as long as the file contains at least one the is terminated, and macro C is executed. never fail, and execution
SET REPLACE command. the
-86 simply waits for the next command.
A:
B:
C:
/E(XECUTE) E(XECUTE) E(XECUTE)
J(UMP) /R(EPLACE)
S(ET) J(UMP) /R(EPlACE) J(UMP) /R(EPLACE)
or
Go must be set to
file contains no
Go must be set to Yes for macro C. This option ensures that the second
command
S(ET)
effect would be the same.
is
on, the
in
a macro is marked as failed, the following occurs: Macro execu-
S(tart)
G(o)
S(tart) S(tart)
SET
Go
in
(?)REPLACE
(nl)
is
G(o) Y(es) could be placed after the
(-)FIND
is
returned to the caller.
caller's next command.
B
C
D
•• ( nl)
Y(es)
"DCl" "IS"
with
macro A is meaningless, because it does not contain a
command. When
is
executed.
No
(the default) for macro
(nl)
of
macro B would enter an infinite loop.
performed regardless of the results of the first
and
(nl)"
with
"DECLARE"
"lITERAllY"
sequences, macro B fails, execution of macro B
is
never marked as failed.
(?)REPlACE
If If
with" ( nl
/EXECUTE B is
is
executed. Likewise, when macro
B. (nl)
If
SET
Go
commands are never
the caller
the caller itself
) ,.
The
REPLACE
(nl)
is
Yes for macro
JUMP
is
main command
is
a macro,
terminated either
command
sequence. When
B,
it will
REPLACE
command, and
If
you
are
not careful
executes. To exit from such a macro or to terminate any macro, press
5.9
Screen Display during Macro Execution
To
speed up macro execution, the amount is executing screen. The information in this section
5.9.1
If
SET
are
displayed on the screen as long as the cursor does not leave
screen, or until a
cursor leaves the screen or a the
macro execution terminates. Then, an implicit VIEW command is performed
using the current logical cursor location.
is
Text
Display
reduced to a minimum. Only selected text or information is sent to the
No
in
(the
VIEW
coding your macro,
of
data
is
given for reference.
default)
is
in
effect, changes
command (either explicit
VIEW
command is issued, screen display
it
might enter an infinite loop when it
(CTRl-C).
written to the screen while a macro
in
the text and cursor movements
the
current display
or
implicit) is issued. When the
is
frozen until
5-9
Macro Commands
If
the
SET
Display Yes is in effect, all changes
screen, even
if
the cursor leaves the screen
and
cursor movements are displayed on
or a VIEW
command
is
given.
AEDIT
-86 User's
Guide
Regardless command
5.9.2
The
message line
Error FIND
CALC an
S9 = "abc").
HEX
QUIT
The
important
When macro execution is terminated, the last message remains on the screen. However, the status (e.g.,
The
message
of
the
SET
or
the
FIND/REPLACE
Display value,
the
text is updated
command and
if
you give the
SET
Showfind Yes is in effect.
Message
is
updated only
message display. /REPLACE
command messages.
assignment
Output
or
OTHER
above set is carefully chosen to contain
or
the
"found: count" message is a special case; it is displayed only
of
the macro execution
command message
statement
and
MACRO
command filename messages.
command affects the message line only.
Other, Viewonly) is updated if needed.
in
the following cases:
The
error message display lasts for about a second. The
"not
found"
For
an argument
(e.g.,
N3+
1
versus
List command messages.
the
at
main command level.
is
not considered an error.
that
is
an expression
N2=N3+
cases where either the message is
?REPLACE
rather
1
or
S9
if
it
is
than
versus
the
last
5.9.3
The questions listed
After editor. This mode
5.9.4
When a new window
exception
place for a future message command the
5.10
Prompt
prompt line
macro execution terminates, the prompt line reflects the current mode
is
changed only when a macro requests an answer to one
in
Section 5.4.
is
either main command level, or
INSERT
or
Window
is
constructed, the text is updated immediately, which
to
the
previous description. The reason for this exception
that
may refer to
operates in the usual manner.
screen will be updated only when macro execution terminates.
the
upper window. The
That
is, when the cursor leaves the screen,
Macro Examples
5.10.1 Example 1
It
is often necessary bracket the the
(1) sets the left column one position to the right each time
single-character macro left squarebracket left each time it is executed:
to
reset the left column.
The
single-character macro right square
([)
sets the left column one position
XCHANGE
is
to create a
KILL_
it
is
executed, and
of
the
of
the
mode.
is
an
WND
to
5-10
M 1
\BRSL+ 1 \NL
M [
\BRSL-l
\NL
\MM \MM
AEDIT -86 User's Guide
These example.
macros
the
can
first
be
defined interactively using the
macro
can
be created by entering the following commands:
MACRO
Create
command.
Macro Commands
For
~ACRO)
Macro
ET)
(to
l
After level the
right level the
left
5.10.2
The occurrence respectively.
M.
M ,
These example,
IACRO)
Macro
IND_
(to
I
I<reate
name:
I.eftcol
terminate
you define these macros, typing a right square bracket
or < MEXEC
or < MEXEC
of
of
its
macro
its
current
current
deJfinliticm
) ] in
INSERT
setting; typing a left square bracket
) [ in
INSERT
setting.
or
XCHANGE
or
XCHANGE
Example 2
folJowing single-character macros, named dot
of
the
target
\BRf
\BR
\BR-
\BR
macros
the
I<reate
name:
termmate
string,
\MM
\MM
can be defined interactively using the
first
macro
could be created as follows:
the
macro
or
find the previous occurrence
definition)
(])
at
main
command
mode sets Leftcol one position to
(])
at
main
command
mode sets Leftcol one position to
(.)
and comma
MACRO
of
the
Create
(,)
find the next target
string,
command. For
After
you
define
<
MEXEC) occurrence followed by a comma in rence
5.10.3
It
is often desirable to use visual breakpoints comment
macro
ing
M® \ BRI(*
You
After INSERT in text.
of
of
the
target
Example 3
lines filled with hyphens to separate procedures in a language.
creates a
can
create
you define this macro, typing @
or
these
macros,
followed by a dot
the
target
string; typing a comma
INSERT
string.
break
line:
- - - - - - - - - - - - - - - - - - - -
this
macro
interactively with the following commands:
XCHANGE
mode inserts the
typing a dot
in
INSERT
or
XCHANGE
(.)
at
main
or
XCHANGE
(,)
at
main command
modes, finds the previous occur-
in
programs.
*) \ NL
at
main command level, or < M
break
line
\ BR \
at
modes finds the next
For
example, you can use
MM
the
current cursor position
command
or < MEXEC
The
EXEC)
level
follow-
or
)
@ in
5-11
Macro
Commands
AEDIT -86 User's Guide
5.10.4
The interactively defined macro named asterisk ten lines.
I<ACRO)
Macro
aTHER)
DUIT) IACRO)
Macro
I<UIT)
Example 4
following sequence
Ireate)
name:
nit
t
BI(ave)
name:
Ipdate)
::XMPL
)
of
commands saves, in a new file named
<RETURN>
.MAC<RETURN>
<RETURN>
EXMPL.MAC,
(*)
that
allows you to scroll backwards
Create
Command sequence
Invoke the which prompts for the macro name
Execute the translate the macro
Update
(EXMPL.MAC),
the macro
macro * interactively
MACRO
MACRO
Save command,
Save command,
* to macro form.
the
macro
which
now
*.
an
file
includes
5-12
CHAPTER 6
AEDIT
AEOIT following characteristics: string variables versus numeric variables, read-only varia­bles versus read-write variables, local variables versus global variables.
Read-only variables renect internal AEOIT-86 values that you can retrieve but
Local variables can be accessed only
6.
The bles
-86 has a set
not modify. Read-write variables can be modified freely. Read-write variable assignment can be done only in
can be accessed
of
variables
in
other contexts as well.
that
the
can be accessed by the user. This set has the
CALC
in
the
command.
CALC
command. Global variables
1 Global Variables
two types are
of
global variables are numeric and string. The global numeric varia-
all read-write. The global string variables can
be
read-only or read-write.
-86
VARIABLES
6.1.1 Global Numeric Variables
The
ten global numeric read-write variables (N-variables), are NO-N9, which are
32-bit- numbers. Values are assigned to the N-variables only
To
fetch an N-variable. type <
key (usually configured to <
86
is
invoked, the N-variables are initialized to zero.
The
N-variables
In any line-edit prompt, e.g., target-string, replacement-string. or
The
contents are inserted and displayed as signed decimal numbers; leading zeros
are
suppressed. The conversion is carried out by the line-editing mechanism,
regardless
Note interpreted as a decimal value. For example, value
HEX
As a count fore, the absolute value
N-variable should be in the legal range, 0-65535. The contents are displayed as an unsigned decimal
In
INSERT
contents of N 1 are inserted in the text in a form
SET
Radix.
then-
IF IF IF
IF IF
The
value is inserted without a suffix and leading zeros are suppressed.
may
be used in the following ways:
of
the command currently being executed.
that
a confusing case occurs when the hexadecimal value of a variable
20H,
which
is
Input, the character E (45H
(or
part
of
and
XCHANGE
For
example,
SET
Radix
is
SET
Radix is binary: 1000101
SET
Radix
is
SET
Radix is hex: 45
SET
Radix is octal: 105
FETN
CTRL-N
equivalent to 45 decimal and you type <
a count) for a command. Count cannot be
of
the N-variable is used. In this case, the value
number; leading zeros are suppressed.
if
alpha: E
decimal: 69
)
i,
where <
) ), and i
ASCII)
modes.
variable N 1 contains the hexadecimal value
For
FETN)
is
any digit from
if
is
inserted into the text.
example, if <
in
the
CALC
is
the "fetch numeric"
0-9.
N 1 contains the hexadecimal
FETN
that
depends
command.
When AEDIT-
GET
FETN
negative~
) 1
is
on
the value
filename.
is
) I under
there-
of
the
typed, the
of
45H,
6-]
AEDIT
-86 Variables
Under prompt.
instead line-editing mechanism. A variable may with its name on the left-hand side
When the message line. This message disappears when the next key
<
FETN
the
CALC Also, ) I. In this case the name, rather than the value,
of
45. The entire processing is done
(FETN)
command. The variable may be retrieved as
the
variable
key
name
may
be used as is, e.g., N I
by
be
modified only
of
an assignment statement.
is
pressed, the message
the
CALC
(FETN)
AEDIT
in
any line-edit
instead
is
displayed, e.g., N I
command, not by the
if
it appears in
appears on the
is
pressed.
CALC
-86 User's Guide
of
6.1.2
The
Read-write string variables
Read-only string variables
Read-Write String Variables
The command. When AEDIT-86
Read-Only String Variables
The is
SB Up to 60 characters
SE
SG
SI The name
Global String Variables
two groups
ten read-write variables are SO-S9. Value assignment
following
allowed.
of
global string-variables (S-variables)
is
invoked, these variables are initialized to a
is
an alphabetic list
text file may be used later as, for example, an argument command.
The name
The name
of
of
of
of
the read-only variables. No assignment of values
of
the Block buffer.
the current edited file (as opposed to the secondary file).
the last file specified
the main input file.
in
the
are-
is
done only
By
using SB, a portion of the
GET
command.
in
the
nul1
in a FIND
CALC
string.
6-2
SM
SO
SP
SR
ST
SW
Using String Variables
To
fetch the value string" key (usually configured to letter appearing as the second letter example, SG. An S-variable contains a string
The name
The name
The name
The replacement string of
The target string
The name
(FETS)
of
the last file specified for the
of
the
of
the last file specified for the BLOCK Put command.
of
the last file specified
of
a string variable, type
7 fetches the value of S7, and
OTHER
of
(-)FIND
input file.
(?)REPLACE.
and
(CTRL-S»,
in
a name
of
0-60
characters.
MACRO
(?)REPLACE.
in
the
QUIT
(FETS)
in
x,
(FETS)
and where x
the above list (e.g.,
(FETS)
Get command.
Write command.
is
the
·<fetch
is
a digit
G fetches the value of
(0-9)
B,
E, G). For
or a
AEDIT -86 User's Guide
The
S-variables
In any line-edit prompt, e.g., target-string, replacement-string, contents are inserted and displayed as an ASCII string.
<
less
In
contents Note that a character
may otherwise have. For example, return, or
Under the edit prompt. Also, the S-variable name may be used as
<
rather than not by the line-editing mechanism. appears in
may
be used
FETS
»)(
to
the
of
which command is currently being executed.
INSERT
FETS ) B.
and
XCHANGE
of
S 1 are inserted
01
BH ( <
CALC
In this case, the name rather than the value
AEDIT.MAC.
CALC
in
the following circumstances:
ASCII
command.
with its name on the left side
that
ESC)
string
is
done by the line-editing mechanism, regard-
modes. For example, if <
in
the text.
is
inserted
) does not cause mode termination.
The
All processing is done
in
ODH
S-variable may
An
AEDIT -86 Variables
GET
filename. The
The
conversion from
FETS
) 1
is
typed, the
this way loses any special meaning it
is
inserted as
S-variabJe may be modified only
of
is
and not as a carriage
be
retrieved as with any line-
is,
e.g., SB instead
is
displayed, e.g., SM
by
the
CALC
an assignment statement.
command and
if
of
it
An S-variable
interpreted as regular characters even
meaning, e.g., < fetches another S variable. However, it includes a fetch operation
When the < line. This message disappears when the next key
6.2
Local Variables
All local variables are read-only numeric variables. Therefore, they cannot and they can be used only
The
following
BOF
COL
CURCH
CURWD
is
always considered as if all its characters are literalized; i.e., they are
if
in
other cases they may have a special
HEX).
FETS)
is
an alphabetic list of positional values:
Logical
The
current logical cursor position
by
the setting
ASCII
ASCII value
Thus an S variable
of
the form <
key
is
pressed, the message <
in
the
CALC
value-true
value
of
of
if the cursor
of
Leftcol.)
the current character.
the two bytes at the current cursor location.
is
never searched to determine if it
in
any other legal context, input
FETS
)
x.
is
command.
is
in
FETS)
pressed.
at
the beginning
the line. (This value
appears on the message
of
file.
is
expanded if
be
assigned,
is
not affected
EOF
INOTHR
ISDEL
ISWHTE
LOWCH
Logical
Logical
Logical user defined delimiter set.
Logical space (space, tab,
If
LOWCH LOWCH
value-true
value-true,
value-true
value-true
the current character
is
the ASCII value of the lowercase character. Otherwise,
is
the same as
if the cursor is at the end
if
you are
if
the character
if the character at the current position
LF
or
in
the
OTHER
at
the current position
CR).
is
an uppercase character
CURCH.
of
file.
buffer.
is
is
(41
H to SAH),
in
the
a white
6-3
AEDIT -86 Variables AEDIT -86 User's Guide
NXTCH
NXTTAB
NXTWD
ASCII
The position as defined by
value
of
the
column number
next character.
of
SET
cursor in the current line,
ASCII
value
of
the second and third bytes following
the
next (Le., to the right
Tab.
If
there are no tabs to the right of
the
value
location.
ROW
UPCH
Current
If is the the
cursor row (actual row, not
the current character
ASCII
same as
value
CURCH.
is
a lowercase character (61 H to 7
of
the uppercase character. Otherwise,
The following values are offset from the beginning file. Note ters, whereas character. the current beginning
CURPOS
TAGA
that
these variables count the carriage
AEDIT-86
If
the file is edited using the
Offset ter
of
Offset
usualJy counts the carriage
of
text. This position may vary as the cursor
of
current location in file.
the file.
of
tag
A.
return/line
FORWARDONL
CURPOS
of
the cursor)
of
NXTTAB
the
logical line in
is zero.
the
the
current cursor
text).
AH),
of
the currently processed input
feed pair as two charac-
return/line
feed pair as one
Y control, the offset is from
is
moved forward.
is
zero for the first charac-
UPCH
UPCH
tab the
is
TAGB
TAGC
TAGD
The
following values relate to the S-variables:
Offset
Offset
Offset
SLO-SL9
SLx
global read-only variable names (e.g.,
The following is an alphabetic list
of
tag
B.
of
tag
C.
of
tag
D.
Relates to the S-variables SO-S9. Each variable contains the length the
corresponding global read-write S-variable.
is
Relates to the S-variables, Sx, where x
the
length
of
the corresponding global read-only S-variable.
of
counters
the second letter in one of the
B,
E, G). Each variable contains
that
contain the actual number
of
of command repetitions from the last time the command was specified with count greater than
one. The
CNTEXE
CNTFND
CNT
prefix signifies
The number
of
COUNT.
times the macro in the current activation. the
value is zero.
Relates to
(-)FIND.
that
The
first execution
is
currently executing has executed
is
number one.
If
none,
6-4
CNTMAC
CNTREP
The
number
of
times
ing) was executed.
Relates to
(?)REPLACE.
that
the last macro (which has finished execut-
AEDIT -86 User's Guide
The
following
PARAGRAPH
·values and
SET
relate
to
the
margin
Autonl commands:
and
indentation
settings
AEDIT-86 Variables
used by
IMARGN LMARGN RMARGN The following values are returned by the UOI-call OQ$GETSTIME:
DATE TIME
The
following are other values:
LSTFND
NSTLVL
6.3
Usage and Interpretation
The value The The
Date returned
Time returned
that some systems always return 0 for the time function.
Logical that an infinite FIND
Nesting level
of
value
of
value
of
value-true
succeeded.)
current indent margin setting. current left margin setting. current right margin setting.
by
DQ$GETSTIME
by
OQ$GETSTIME
if the last find or replace string was found.
FIND
of
(IF)
sets this variable to
the currently executing macro, console input
in
decimal format mmddyy.
in
decimal format hhmmss: note
TRUE
of
Global Variables in
if
at least one
is
level
(Note
Macros
When the value actual value is used for the current activation. A reference to this variable into the macro definition. Therefore, in a future activation of the macro, the value the variable at
the time
of
any AEOIT-86 variable
at
the time
of
macro definition.
of
macro activation
is
fetched during
will
be
used, not the value of the variable
MACRO
Create, the
is
inserted
O.
of
For example, I(NSERT) < FETS) 7 (ESC) and S7 ="abc" at the time the macro was defined, abc
tion.
If
xyz is inserted.
6.4
Summary
if
you have the following macro:
the definition
of
of
S7
is
changed to xyz and the above macro
AEDIT
-86 Variables
6.4.1 Read-Only Variables
The following of
values S8 SE SG SI The name of the main input file.
is
an alphabetic list of the read-only string variables.
is
allowed.
Up
to 60 characters The name of the current edited file. The name
of
the last file specified
of
the Block buffer.
in
the
is
used for the current activa-
is
again activated,
No
assignment
GET
command.
6-5
AEDIT
-86 Variables
AEDIT -86 User's Guide
SM
so
SP
SR
ST
SW
The name of the last
The name of the OTHER input file.
The name of the last
The replacement string of (?)REPLACE.
The target string of
The name of the last
file
specified for the MACRO Get command.
file
specified for the BLOCK Put command.
(-)FIND
file
and (?)REPLACE.
specified for the
QUIT
Write command.
6.4.2 Local Variables
All local variables are read-only numeric variables. They cannot they can be used only in the CALC command.
The following is an alphabetical
BOF Logical
COL The current logical cursor position
by the setting of Leftcol.)
value-true
list of positional values:
if the cursor
is
at
the beginning of
in
the line. (This value
be
assigned, and
file.
is
not affected
CURCH
CUR
WD ASCII value of the
EOF Logical
INOTHR
ISDEL Logical
ISWHTE
LOWCH
NXTCH
NXTT
AB The column number of the next (i.e., to the right of the cursor) tab
NXTWD
ASCII value of the current character.
two
bytes at the current cursor location.
value-true
Logical
user defined delimiter set.
Logical
space (space, tab,
If
LOWCH LOWCH
ASCII value of the next character.
position as defined
ASCII value of the second and third bytes following the current cursor location.
value-true
value-true
value-true
the current character
is
the ASCII value of the lowercase character. Otherwise,
is
the same as CURCH.
if the cursor
if
you
if the character at the current position
if the character at the current position
LF-ar CR).
is
by
SET Tab.
is
at the end
are
in
the
OTHER
an uppercase character (41H to 5AH),
of
file.
buffer.
is
is
a white
in
the
6-6
ROW The current cursor
UPCH
If
the current character is the ASCII value of the uppercase character. Otherwise, UPCH the same as
CUReH.
row
(actual
is
row,
a lowercase character
not the logical line
(61
H to 7 AH), UPCH
in
the text).
is
AEDIT -86 User's Guide
The
following values are offset from the beginning
file:
of
the currently processed input
AEDIT-86 Variables
CURPOS TAGA TAGB TAGC TAGD
The offset The The offset The offset The offset of
offset
of
current location
of
tag
A.
of
tag
B.
of
tag C. tag
D.
in
file.
The following values relate to the S-variables: SLO-SL9 SLx
Relates to the S-variables SO-S9. Relates to the S-variables, Sx, where x
global read-only variable names (e.g.,
The following
is
an alphabetic list
of
counters
that command repetitions from the last time the command than one:
CNTEXE
The number
of
times the macro that
is
in the current activation. The first execution
CNTFND
the value Relates to (-
is
zero.
)FINO.
is
a second letter of one
B,
E,
G).
contain the actual number
was
specified with count greater
of
the
of
currently executing has executed
is
number one.
If
none,
CNTMAC
The number of times
that
the last macro (which has finished execut-
ing) was executed.
CNTREP
The
following values
PARAGRAPH
IMARGN LMARGN RMARGN
Relates to
and
(?)REPLACE. relate
SET
to
Autonl commands:
the
margin
and
indentation
The value of current indent margin setting. The value The value
of
current left margin setting.
of
current right margin setting. The following values are returned by the UOI-call DQ$GET$TIME: DATE TIME
Date in decimal format mmddyy.
Time in decimal format
hhmmss~
note that some systems always return
o for the time function.
The following are other values: LSTFNO NSTLVL
Logical
The level zero.
value-true
nesting level
if
the last find or replace string was found.
of
the currently executing macro; console input
setting
used
by
is
6-7
CHAPTER 7
CALC
The
CALC coupled with AEDIT-86 variables enable the following, for example: centering a phrase on a line, finding the size of an input file, or changing a letter from lowercase to uppercase or vice versa.
To
execute the
----
C
IS
1 c :
The last statement entered under
7.
1 Introduction
Either a numeric or a string statement the statement expression includes logical operators, relational operators, operators. As usual, an expression may include parentheses. These, plus the prece­dence and associativity rules
The operators act on the following elements: numeric constant (integers only), string constants, AEDIT-86 numeric local variables, N-variables, and S-variables.
command provides you with computation capabilities. These capabilities
CALC
<HOME)
is
is
comparable to expressions in many other programming languages. It
command, press C; AEDIT-86
to
re-edit
CALC
either an assignment statement or merely an expression. A
of
the operators, completely define the evaluation order.
is displayed to the right of the colon.
is
legal input to a
shift/rotate
prompts-
CALC
command.
operators, and arithmetic
COMMAND
In
general,
CALC
the
Arithmetic using detection is performed.
7.2
Syntax Diagrams for CALC Statement
This section presents diagrams, every path you can follow in the direction syntactically correct construct
keywords, letter symbols, and punctuation symbols that input
are
enclosed
language constructs that are defined in their own syntax diagrams) are enclosed rectangles.
ILstatement:
CALC
the
in
circles or ovals. Nonterminal symbols (terms standing for
command
CALC
of
is
32-bit signed arithmetic.
input syntax in syntax diagram form.
of
the arrow represents a
CALC
input. Terminal symbols
are
typed verbatim as
of
the language,
No
overflow
In
these
CALC
in
[
t
1...-
_L
.......
_nt
1
---Jl--~
-I,--_·X_pr,,_sion~~_.
v-r-
7-1
CALC
Command
L
.........
AEDIT-86 User's
:
Guide
~.---n_.-
..
temen-t
~
8trin~con.tant
Notes:
n_statement, s_statement : n stands for numeric, s stands for string.
LeIement, r_element : I stands for left, r stands for right.
Uppercase and lowercase letters are not distinguished from each other except in string constants. For example, curpos and
One or more blanks may be inserted between tokens. However, when ity
is
possible, blanks are not required. For example, 1 + 2
Ni,
Si,
N(.
..
), S(.
..
) : the value of i and the value of the expression within the
parentheses should be The value true is represented by
• represented by value
is
unary_operator: see Table 7-1.
binary_operator: see Table 7-1.
AEDIT_numeric_IocaLvariable : described in Chapter
numeric_constant: see Section 7.3.
strin~constant
O.
either true
in
the range 0-9.
-1;
Whenever an operator produces a logical (Boolean) value,
or
false.
: see Section 7.4.
CURPOS
i.e., OFFFFFFFFH, and the value false
are interchangeable.
is
a legal expression.
6.
no
ambigu-
r--.
that
is
7-2
AEDIT -86 User's Guide
Table
7-1.
Operators' Precedence and Associativity
CALC
Command
Operator
••
Cia
Parentheses (
Unary
Power
Arithmetic (mul/div)
Arithmetic (add/sub)
Operator Interpretation
) Controls evaluation
-
+
! # Single positive opera- From right
-
..
.
\ Multiplication, division,
/
-
+
order: expressions in
parentheses are
evaluated before the
of
action operator
in
tor, Single negative operator, 1 's com
ment (-or ') !(#3)
P~S
NEG
Raising to the power From right of left, e.g.,
mod (remainder) div
Addition, subtraction
any outside on
parentheses
the items
operator (!) operator
(#)
ple-
A
..
oclatlvlty
From inside to
outside
left, e.g., !#3is
3·-
4" (4
S is
"S)
.•
13
is
3"·
From left to right. e.g 11 • 12" (11-12)·13
From left to right, e.g., 2-3+4 (2-3)+4
to
to
is
Shift/rotate
Relational
Logical &
7.3
Numeric Constants
The
CALC octal, decimal, or hexadecimal. The the
suffix
ered decimal. A numeric constant may be
7.4
String Constants
SHL,SHR,SAL.SAR,ROL,ROR Shift left, shift right, From left to
===
<=
<
I
1\
<>
=>
>
algebraic left, right, e.g.,
shift
algebraic right,
shift rotate left, rotate right. 1 is
Less than, less than From left to or equal to. not equal to, greater than or equal to, greater than
AND,
OR,
equal to,
XOR
SAR 1 SAR
S (5
SAR
1)
SAR 1
right, e.g.,
< 4 < 2 is
3
<
4)
< 2
(3
From left to right. e.g S & 3
1\
3)
1\
(5 &
command numeric constants are integer numbers. They can be binary,
B,
0 (or Q),
CALC
D,
or H, respectively. Numbers without a suffix are consid-
command recognizes these constants
in
the
range-(2**31)
to
+(2**31)-1.
A string constant may be 0-60 characters long with same delimiter at both ends.
same delimiter means that there
ter
immediately to the left
is
no
predefined string delimiter; rather, the charac-
of
the string constant
is
identified as a delimiter. Then the
..
7 is
7
by
The
7-3
CALC
ColDlDand
AEDIT -86
User's
Guide
second occurrence of that character signifies the right end
of
the string. To prevent ambiguity, the following characters may not serve as string delimiters: letters, digits, blank, and tab.
is
A natural delimiter choice a quotation mark, a different character, one that does not appear
a quotation mark. However, if the string constant includes
in
the string, should
be used as the delimiter.
is
The case of the letters within the string
7.5
Operators
preserved.
Syntactically, operators are divided into two groups: unary operators and binary operators. From the functional point of
view,
the operators are divided into the
following groups: logical operators, relational operators, shift/rotate operators, and
7-1
arithmetic operators. Table
7-1
Table
lists all the CALC command operators with a brief description of the
partially reflects this partition.
semantics of each operator. Following are more detailed descriptions of the nontrivial operators:
1.
- and ' possible difficulties meaning. 1 's complement means for every
2.
! and # :
The POS operator
If
(1
's complement) have the same meaning. The duplicate notation prevents
on
terminals where one of these characters may have a special
(!)
is
defined as
number > 0 then return true (
follows:
-1
)
0 bit, a 1 bit
is
returned and vice versa.
else return false (0). The
NEG
operator
If
number > 0 then return false (0)
else return true (
3.
\ (modulo division) returns the remainder of
4.
\ 4 =
1\
3;
(XOR)
16 \ 4 =
returns true only if one operand wise it returns false. This 51\1
=4.
-1
(#)
).
is
defined
O.
as
follows:
an
integer division, for example, 7
is
true and the other
is
done for each bit in the argument, for example,
is
false; other-
7-4
7.5.1
In the shift/rotate operations, the left operand
is
In a shift, bits moved off one end of the pattern are lost, and
moved into the pattern from the other end. In a rotate, bits
Shift/Rotate
moved
to the right or to the left by the number of bits specified
Operators
is
handled as a pattern
by
0 bits or 1 bits are
moved
move onto the other end.
SAL
and SAR are algebraic shift operators. This means that the high order bit
is
sign bit, and there
a left shift (SAL),
0 bits (if pattern
either
no shift of bits between the sign and the rest of the number. In
0 bits move into the pattern from the right. In a right shift (SAR),
is
positive) or 1 bits (if pattern is negative) move into the
pattern from the left.
is
In every shift/rotate operation, the right operand (count)
256.
always taken as modulo
of
32
bits.
It
the right operand.
off of one end
is
the
AEDIT -86 User's Guide
7.6
Expression Evaluation
CALC
Command
Operators
and
Table those
precedence.
The controlled first by parentheses, associativity. in paired parentheses theses pairs. der
The
01 + n2
01 +
n 1
SHR
(nl
02 «n2 + 3)
in
the
CALC
operators
7-1
that
evaluation order is
of
the
precedence
(n2 * (n3
SHR
are
lists
the
take
effect first
The
The
expression.
and
* n3
**
**
3 ::> n2
3) ::>
(n2
command have an implied order that determines how operands
grouped
CALC
CALC
value
-
(-n4»)
SHL
and
evaluated.
command
are
listed first).
the
same
then
command
as
subexpressions, working from innermost to outermost paren-
of
the
sUbexpression
associativity rules are demonstrates by the following examples:
n4
n7 + 4 * #2
SHL
(n7 + (4 *
+ 3 < > n4 - 5 & n4 - 2 = = n5
< >
(n4 -5» & «n4
operators from highest
Operators
as
that
used
in
most programming languages. by operator precedence, first evaluates operands and operators enclosed
is
then used as an operand
(#2»»
- 2)
==
n5)
to
lowest precedence (i.e.,
in
the
same
line
and
finalJy by
is equivalent
is equivalent to
is equivalent to
are
in
of
operator
the
remain-
equal
It
is
to
7.7
Examples
See
also
Chapter
command.
8 on Advanced
7.7.1 Example 1
S3
The
value
of
the
S-variab]e S3 is displayed at the message line;
7.7.2
nl
Assuming Then (because N (6)
N 1 =
the
7.8
Example 2
= n ( n ( n2 = 2 * n3) )
that
N3
contains 3
2 *
N3 = 6;
is equivalent to
N8.
Because
message line.
Errors
AEDIT-86
and
N6
contains
therefore,
N8
contains zero, N 1 gets this value
N2 N6,
gets 6,
thus
Usage for examples using the
8,
and
giving
Nt
no
assignment.
and all other N-\'ariables
N6
is the index for the
= N
(N6».
(0),
N6
contains
and
0 is displayed on
CALC
are
zero.
"outer"
8;
N
thus
The
following messages detected, followed by a portion
the
corresponding
of
are
issued under the
error
the
command
CALC
message is displayed on
where
the
command.
error
was detected.
When
the
MESSAGE
an
error
line,
is
7-5
·
CALC
Command
AEDIT
-86 User's Guide
Message Divide by zero error Expression too complex
Floating point not allowed Illegal exponential operation
Illegal expression
Invalid base character Invalid numeric constant
MO D by zero
error
Numeric constant too large
Unbalanced parenthesis
Explanation An attempt was made to divide by zero. The
expression is
too
complex;
simplify
expression.
Real values (e.g., 5.2) are not allowed.
Usually occurs when a negative value the
right
expression
operand.
is displayed on
The
illegal
the
message line.
exponential
Correct it and rerun CALC.
is
The illegal expression line. Correct
The
base character is not valid, e.g., 1 AD.
it
and rerun CALC.
The numeric constant
displayed
is
not valid. An attempt was made to take A numeric integer constant must be
-(2**31)
to (2**31
)-1.
Either the right or left parenthesis
on
MOD
the message
with zero.
in
is
missing.
the
is
used as
the range
Unrecognized identifier
The illegal identifier
is
displayed
line. Correct it and rerun
CALC.
on
the message
7-6
Loading...