To insert the characters in the paste buffer, press the PASTE Command key on the
keyboard. When this is done, the characters will be inserted
as
desired. Line 20 will
now appear
as:
20
IF
N - 0
THEN
GOTO
60
ELSE
CT
-
CT
+
:I.+-
.
The movement
of
The
characTers from one part
of
the program to another requires a
SELECT, a
CUT,
and a PASTE.
After the cut operation, the characters remain in the paste buffer and can be inserted
in
another part
of
the program
if
desired.
Exit from the Editor. List your program to confirm that it is correct:
10
INPUT
"NUMBER";
N
20
IF
N=0
THEN
GOTO
60
ELSE
CT
=
CT
+ 1
30
Alj
=
AlJ
+ N
50
GDTD
10
60
PRINT
"AljERAGE
IS";
AlJ/CT
Execute the program to confirm that it works as it did before.
Experiment
#8
Copying a Phrase (without deleting it)
The previous program will be modified so that the sum of the numbers entered will be
printed before the average value is printed. The revised program will be
as
follows:
10
INPUT
"NUMBER";
N
20
IF
N=0
THEN
GOTO
60
ELSE
CT
=
CT
+ 1
£10
AlJ
=
AV
+ N
50
GOTO
10
60
PRINT
"SUM
IS";
AlJ
70 PRINT
"AljERAGE
IS";
AlJ/CT
Note that the previous line 60 is now line 70 and a new line 60 has been added. These
changes will be made with the Editor.
Enter the command
EDIT
83