Number

PurposeNUMBER enables new line numbers to be assigned to all current lines or to a range of lines.

Syntax

N/UMBER/ [[line1[:line2],startnum [,incr]]

NUMBER

with no options renumbers the entire current set of lines, assigning 10 as the first line number and increasing each subsequent line number by 10.

line1

is the first line to be renumbered.

line2

is the last line in the range, if line2 is omitted, ACCENT R renumbers from line1 to the end of the file.

startnum

is the new line number to be assigned to the first line being re-sequenced.

incr

is an integer that specifies the value by which each subsequent new line number is to be increased.  If not supplied, it is 10 by default.

Example

The following interaction includes the NUMBER editing command.

--PRINT
00010  PUB_CODE,CHAR,4
00020  PUB_NAME,CHAR,40
00030  CITY,CHAR,20
00040  STATE,CHAR,2
--NUMBER 10:30,1,3
--PRINT
00001  PUB_CODE,CHAR,4
00004  VPUB_NAME,CHAR,40
00007  CITY,CHAR,20
00040  STATE,CHAR,2
--NUMBER 1, 5, 15
--PRINT
00005  PUB_CODE,CHAR,4
00020  PUB_NAME,CHAR,40
00035  CITY,CHAR,20
00050  STATE,CHAR,2
--

NOTES:  If just one value is given, it is assumed to be the startnum, and is applied to the first line of the file.  If two values are given separated by a comma, they are assumed to be the startnum, incr.