Renumber Command [REN]

Qedit 5.7 for HP-UX

Home Previous Next


Renumber Command [REN]

Renumbers a range of lines or the entire workfile.

RENUM[ firstline ] [ maxincr]

[ startline / stopline ] [ maxincr ]

(Default: entire file from 1.0 by current increment)

If you specify a range of lines (e.g., 101/102), Qedit spreads out the line numbers in that range to allow as much space as possible between each line. The numbers of the startline and stopline are not changed.

If you do not specify a range, Qedit renumbers the entire file, starting at 1.0 or from the optional startline value.

If you specify a maxincr value, Renum will attempt to renumber with that increment. If it must use a smaller value, it will print a warning. If you do not specify a maxincr value, Renum attempts to use the current Set Increment value which defaults to 1.0 (except for standard COBOL which is 0.1).

Examples

/ren             {assign new numbers to all lines}
/list 10/11      {show current line numbers}
   10     The Renumber command
   10.2   has two basic modes:
   10.21     1.  renumber an entire file
   10.211    2.  spread out a range of lines
   11     to make room for new lines.
/add 10.21       {attempt to add a line}
Out of line numbers.  Suggest Renumber.
/ren 10/11       {spread out line range evenly}
/list 10/11      {check new lines numbers}
   10     The Renumber command
   10.2   has two basic modes:
   10.4     1.  renumber an entire file
   10.6     2.  spread out a range of lines
   11     to make room for new lines.
/add 10.4        {now you can add some lines}
   10.5        (usually from 1.0 by 1.0).
   10.51   //

Notes

If you keep adding new lines at the same spot in a file, Qedit will assign incremental line numbers such as 3.01, 3.011, but it cannot add a line between 3.011 and 3.012. The smallest increment between lines is 0.001. When you run out of line numbers, Qedit warns you. You can Renumber a range of lines or the entire file to get around this problem.


Home Previous Next