Run the program. If you enter the name LINDA, the output will look like this:
i'M\ME?
1....
I
NDf\
AGE
I~"3
~~
Ok
II
Obviously, the program
is
not working correctly. The correct age
is
42, not 0. The
problem
is
in
line 40. Variable A at the end
of
this line should be changed to AG.
Line 40 should appear
as
£10
PRINT
"AGE
15",
AG
This error could be corrected by retyping the line
as
shown above. But instead, we'll
use
the
Editor to change the variable name to
AG
by
inserting the single character G
after A. Type the command
ED
I T
(ENTER)
You will see the following displayed:
10
INPUT "NAME";
NS.
2~:J
I~EAD
1'~'S
'j
,·\G
30
IF
A$<>N$
THEN
GOTO
20
40
PRINT
"AGE
IS",
A.
S0
DATA
DAN,
32,
RON,
38,
LINDA,
424
60
DATA
BETTY,
35,
RALPH,
29.
SKIP,
3
The Computer enters the editor mode and the program
is
displayed. The cursor
is
on
the
first character of the program. The symbol
at the end
of
each line
is
used to display the carriage return character that
is
generated
when
(ENTER)
is
pressed. The
..,..
displayed after line 60
is
an end-or-file marker.
To insert the
"G"
after the variable A in line 40, the cursor must be moved
so
that it
is
directly over the .... in line 40.
The cursor
is
moved using the four Cursor Movement Keys in the upper right comer
of the keyboard. The arrows indicate which way the cursor will be moved when the
key
is
pressed.
70