Using HP Instrument BASIC
Modifying Program by using Editor Functions
Step 1. Inserting Lines
Type
EDIT 20
, then press
4
Enter
5
. Cursor appears at line 20.
10 FOR I=1 TO 10
20 PRINT I
30 NEXT I
40 END
Select
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Insert line
or press
4
Insert
5
to insert a line above line 20.
10 FOR I=1 TO 10
11
20 PRINT I
30 NEXT I
40 END
Type as follows:
10 FOR I=1 TO 10
11 PRINT I^2
12
20 PRINT I
30 NEXT I
40 END
I^2
means the second power of I. The above program increments
I
from 1 to
10, and displays second power of I and I for each step
.
Select
NNNNNNNNNNNNNNNNNNNNNNNNNN
End edit
to exit editor, then press
4
Run
5
to execute the program. The
following is displayed:
1
1
4
2
9
3
.
.
.
81
9
100
10
1-11