HP 3000 Manuals

Renumber Lines [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Renumber Lines 

Purpose 

Enables renumbering of several lines of text.

Default Syntax 
[REV BEG]

ESC r
[REV END]

Description 

This command enables you to renumber a series of consecutive lines.  You
can renumber the lines only if the current file is numbered.

Refer to "Line Numbering" in chapter 2 for complete information on this
subject.

Command Process 

When you execute the command, HP EDIT prompts you for the range of lines
to renumber, the new starting line number, and the desired increment for
renumbering.  You can cancel the renumbering process by pressing Return 
in response to the prompts.

Requirements 

When HP EDIT prompts you for the new starting line number, you must
respond with a number that preserves the ascending line order.  For
instance, if you specify a starting line number that already exists and
is not in the range being renumbered, HP EDIT rejects your entry.

Besides maintaining the ascending order, your entry cannot exceed three
numerals beyond the decimal point.  If you attempt to enter four numerals
following the decimal point, HP EDIT displays Not a valid line number on
the message line, and you must reenter the command.

The permissible numbering range is from 0.001 to 99999.998 for
standard-numbered files, and from 0.001 to 999.998 for COBOL files.

Procedure 

To renumber a series of lines: 

   1.  Press ESC, then press the [REV BEG]r [REV END] key.  HP EDIT
       displays First line in range to renumber?  on the message line.

   2.  Enter the first line number of the series of lines that you want
       to renumber and press Return.  HP EDIT displays Last line in range 
       to renumber?  on the message line.

   3.  Enter the last line number of the series that you want to renumber
       and press Return.  HP EDIT displays New starting line number?  on
       the message line.

   4.  Enter the desired first line number and press Return.  HP EDIT
       displays Increment to use?  on the message line.

   5.  Enter the number with which you want the number series to be
       incremented.  For instance, if you want to increment the series in
       tenths, enter .1 and press Return.  HP EDIT displays a/b --> c/d 
       on the message line, where:

            a = the previous first number
            b = the previous last number
            c = the new first number
            d = the new last number

[REV BEG]

To renumber a block of lines: 

   1.  Select a line block of text.

   2.  Press ESC, then press the r key.  HP EDIT displays New starting 
       line number?  on the message line.

   3.  Enter the new starting line number and press Return.  HP EDIT
       displays Increment to use?  on the message line.

   4.  Enter the number with which you want the number series to be
       incremented.  HP EDIT displays a/b --> c/d on the message line
       (see the procedure to renumber a series of lines above for a
       definition of the display).
[REV END]

Examples 

To renumber the following standard-numbered lines in increments of a 
tenth: 

            1     Text to be renumbered
            2     Text to be renumbered
            3     Text to be renumbered
            4     Text to be renumbered
            5     Text to be renumbered

   1.  Press ESC, then press the [REV BEG]r[REV END] key.  HP EDIT
       displays the following message:

            First line in range to renumber? _

   2.  Type the number 1 at the cursor position and press Return.  HP
       EDIT displays the following message:

            Last line in range to renumber? _

   3.  Type the number 5 at the cursor position and press Return.  HP
       EDIT displays the following message:

            New starting line number? _

   4.  Type the number 1.1 at the cursor position and press Return.  HP
       EDIT displays the following message:

            Increment to use? _

   5.  Type the number .1 at the cursor position and press Return.  HP
       EDIT displays the following message and changes the line numbers
       as shown below:

[]
The number sequence on the message line (1/5--> 1.1/1.5) means that the previous line numbers of 1 through 5 are renumbered 1.1 through 1.5. Related Commands Edit Line Number


MPE/iX 5.0 Documentation