HP IBASIC Supplement 5-15
Developing Programs
Editing Your Program Using Edit
Renumbering, Copying, Moving, and
Indenting Lines
If you want to change the line number of an edited program line, move
the cursor to the line number field and enter the line number you want.
Changing the line number causes a copy operation, not a move.
Therefore, if you only want to move the line, change the line number
first, press and then delete the original line. If you want to
create an edited copy of the current line, edit the line and then change
the line number and press . The edits will only appear in the
copied line.
If you are inserting a program line and you change the line number, the
line will move to its new location when you ENTER it. The editor will
remain in insert mode at the new location in the program.
You will notice that when the cursor is in the line number field, entries
operate in an overtype fashion rather than in the insert fashion as in the
text portion of the program line. Also the ← (backspace) key moves the
cursor over line numbers without deleting the number.
NOTE Renumbering the entire program with RENumber. To renumber the
entire program, IBASIC supports the RENumber command but you need
an external keyboard to execute it. The command can be executed by
following the steps listed below.
1. Exit the edit mode by pressing until the
menu is active.
2. Partition an IBASIC display as described next in this chapter, or
press the Esc (Escape) key on the keyboard to enable the command
line.
3. Enter the command REN x,y (where x is the new beginning line
number and y is the increment) from the command line of the IBASIC
display
4. Another way to “renumber” program lines with an external keyboard
is to use the COPYLINES and MOVELINES commands. Use the INDENT
command to make your code more readable.
SYSTEM OPTIONS