CHAPTER 6
AEDIT
-86
VARIABLES
AEOIT
-86 has a set
of
variables
that
can be accessed by the user. This set has the
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
not modify. Read-write variables can be modified freely. Read-write variable
assignment can be done only in
the
CALC
command.
• Local variables can be accessed only
in
the
CALC
command. Global variables
can be accessed
in
other contexts as well.
6.
1 Global Variables
The
two types
of
global variables are numeric and string. The global numeric varia-
bles
are
all read-write. The global string variables can
be
read-only or read-write.
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
in
the
CALC
command.
To
fetch an N-variable. type <
FETN
)
i,
where <
FETN)
is
the "fetch numeric"
key (usually configured to <
CTRL-N
) ), and i
is
any digit from
0-9.
When AEDIT-
86
is
invoked, the N-variables are initialized to zero.
The
N-variables
may
be used in the following ways:
• In any line-edit prompt, e.g., target-string, replacement-string. or
GET
filename.
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
of
the command currently being executed.
Note
that
a confusing case occurs when the hexadecimal value of a variable
is
interpreted as a decimal value. For example,
if
N 1 contains the hexadecimal
value
20H,
which
is
equivalent to 45 decimal and you type <
FETN
) I under
HEX
Input, the character E (45H
ASCII)
is
inserted into the text.
• As a count
(or
part
of
a count) for a command. Count cannot be
negative~
there-
fore, the absolute value
of
the N-variable is used. In this case, the value
of
the
N-variable should be in the legal range, 0-65535. The contents are displayed as
an unsigned decimal
number; leading zeros are suppressed.
• In
INSERT
and
XCHANGE
modes.
For
example, if <
FETN
) 1
is
typed, the
contents of N 1 are inserted in the text in a form
that
depends
on
the value
of
SET
Radix.
For
example,
if
variable N 1 contains the hexadecimal value
45H,
then-
IF
SET
Radix
is
alpha: E
IF
SET
Radix is binary: 1000101
IF
SET
Radix
is
decimal: 69
IF
SET
Radix is hex: 45
IF
SET
Radix is octal: 105
The
value is inserted without a suffix and leading zeros are suppressed.
6-]